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. 8
      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": {

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

@ -15,7 +15,11 @@ export const getModelSchemas = (ctx: {
...(ctx.columns?.reduce( ...(ctx.columns?.reduce(
(colsObj, { title, virtual, column, ...fieldProps }) => ({ (colsObj, { title, virtual, column, ...fieldProps }) => ({
...colsObj, ...colsObj,
[title]: fieldProps, ...(column.system
? {}
: {
[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