Browse Source

Merge pull request #6332 from nocodb/fix/6331-links-swagger-api-entries-missing

fix: Add missing endpoints in swagger json
pull/6334/head
Pranav C 1 year ago committed by GitHub
parent
commit
df83c9a49c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      packages/nocodb/src/services/api-docs/swagger/getSwaggerColumnMetas.ts
  2. 6
      packages/nocodb/src/services/api-docs/swagger/templates/paths.ts

1
packages/nocodb/src/services/api-docs/swagger/getSwaggerColumnMetas.ts

@ -36,6 +36,7 @@ export default async (
field.type = 'object'; field.type = 'object';
break; break;
case UITypes.Rollup: case UITypes.Rollup:
case UITypes.Links:
field.type = 'number'; field.type = 'number';
break; break;
case UITypes.Attachment: case UITypes.Attachment:

6
packages/nocodb/src/services/api-docs/swagger/templates/paths.ts

@ -1,4 +1,4 @@
import { ModelTypes, UITypes } from 'nocodb-sdk'; import { isLinksOrLTAR, ModelTypes, UITypes } from 'nocodb-sdk';
import { import {
columnNameParam, columnNameParam,
columnNameQueryParam, columnNameQueryParam,
@ -670,7 +670,5 @@ function getPaginatedResponseType(type: string) {
}; };
} }
function isRelationExist(columns: SwaggerColumn[]) { function isRelationExist(columns: SwaggerColumn[]) {
return columns.some( return columns.some((c) => isLinksOrLTAR(c.column) && !c.column.system);
(c) => c.column.uidt === UITypes.LinkToAnotherRecord && !c.column.system,
);
} }

Loading…
Cancel
Save