Browse Source

fix: exclude system columns

pull/6982/head
Pranav C 1 year ago
parent
commit
e27d71e10d
  1. 2
      packages/nocodb/src/services/api-docs/swaggerV2/swagger-base.json
  2. 6
      packages/nocodb/src/services/api-docs/swaggerV2/templates/schemas.ts

2
packages/nocodb/src/services/api-docs/swaggerV2/swagger-base.json

@ -10,7 +10,7 @@
} }
], ],
"paths": { "paths": {
},a¯¯¯¯ },
"components": { "components": {
"schemas": { "schemas": {
"Paginated": { "Paginated": {

6
packages/nocodb/src/services/api-docs/swaggerV2/templates/schemas.ts

@ -15,8 +15,12 @@ export const getModelSchemas = (ctx: {
...(ctx.columns?.reduce( ...(ctx.columns?.reduce(
(colsObj, { title, virtual, column, ...fieldProps }) => ({ (colsObj, { title, virtual, column, ...fieldProps }) => ({
...colsObj, ...colsObj,
...(column.system
? {}
: {
[title]: fieldProps, [title]: fieldProps,
}), }),
}),
{}, {},
) || {}), ) || {}),
}, },
@ -30,7 +34,7 @@ export const getModelSchemas = (ctx: {
...(ctx.columns?.reduce( ...(ctx.columns?.reduce(
(colsObj, { title, virtual, column, ...fieldProps }) => ({ (colsObj, { title, virtual, column, ...fieldProps }) => ({
...colsObj, ...colsObj,
...(virtual ...(virtual || column.system
? {} ? {}
: { : {
[title]: fieldProps, [title]: fieldProps,

Loading…
Cancel
Save