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": {
},a¯¯¯¯
},
"components": {
"schemas": {
"Paginated": {

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

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

Loading…
Cancel
Save