Browse Source

fix(swagger): update attachment column type

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4513/head
Pranav C 2 years ago
parent
commit
953716cf4b
  1. 7
      packages/nocodb/src/lib/meta/api/swagger/helpers/getSwaggerColumnMetas.ts
  2. 21
      packages/nocodb/src/lib/meta/api/swagger/helpers/swagger-base.json

7
packages/nocodb/src/lib/meta/api/swagger/helpers/getSwaggerColumnMetas.ts

@ -40,6 +40,12 @@ export default async (
case UITypes.Rollup:
field.type = 'number';
break;
case UITypes.Attachment:
field.type = 'array';
field.items = {
$ref: `#/components/schemas/Attachment`,
};
break;
default:
field.virtual = false;
SwaggerTypes.setSwaggerType(c, field, dbType);
@ -58,4 +64,5 @@ export interface SwaggerColumn {
virtual?: boolean;
$ref?: any;
column: Column;
items?: any;
}

21
packages/nocodb/src/lib/meta/api/swagger/helpers/swagger-base.json

@ -34,6 +34,27 @@
}
}
},
"Attachment": {
"title": "Attachment",
"type": "object",
"properties": {
"mimetype": {
"type": "string"
},
"size": {
"type": "integer"
},
"title": {
"type": "string"
},
"url": {
"type": "string"
},
"icon": {
"type": "string"
}
}
},
"Groupby": {
"title": "Groupby",
"type": "object",

Loading…
Cancel
Save