Browse Source

chore(swagger): type correction

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3188/head
Pranav C 2 years ago
parent
commit
9c74e5285c
  1. 36
      packages/nocodb-sdk/src/lib/Api.ts
  2. 104
      scripts/sdk/swagger.json

36
packages/nocodb-sdk/src/lib/Api.ts

@ -3062,32 +3062,40 @@ export class Api<
}), }),
/** /**
* No description * @description Read project details
* *
* @tags Public * @tags Public
* @name SharedViewMetaGet * @name SharedBaseGet
* @request GET:/api/v1/db/public/shared-view/{sharedViewUuid}/meta * @request GET:/api/v1/db/public/shared-base/{sharedBaseUuid}/meta
* @response `200` `object` OK * @response `200` `{ project_id?: string }` OK
*/ */
sharedViewMetaGet: (sharedViewUuid: string, params: RequestParams = {}) => sharedBaseGet: (sharedBaseUuid: string, params: RequestParams = {}) =>
this.request<object, any>({ this.request<{ project_id?: string }, any>({
path: `/api/v1/db/public/shared-view/${sharedViewUuid}/meta`, path: `/api/v1/db/public/shared-base/${sharedBaseUuid}/meta`,
method: 'GET', method: 'GET',
format: 'json', format: 'json',
...params, ...params,
}), }),
/** /**
* @description Read project details * No description
* *
* @tags Public * @tags Public
* @name SharedBaseGet * @name SharedViewMetaGet
* @request GET:/api/v1/db/public/shared-base/{sharedBaseUuid}/meta * @request GET:/api/v1/db/public/shared-view/{sharedViewUuid}/meta
* @response `200` `{ project_id?: string }` OK * @response `200` `(ViewType & { relatedMetas?: any, client?: string, columns?: (GridColumnType | FormColumnType | GalleryColumnType), model?: TableType } & { view?: (FormType | GridType | GalleryType) })` OK
*/ */
sharedBaseGet: (sharedBaseUuid: string, params: RequestParams = {}) => sharedViewMetaGet: (sharedViewUuid: string, params: RequestParams = {}) =>
this.request<{ project_id?: string }, any>({ this.request<
path: `/api/v1/db/public/shared-base/${sharedBaseUuid}/meta`, ViewType & {
relatedMetas?: any;
client?: string;
columns?: GridColumnType | FormColumnType | GalleryColumnType;
model?: TableType;
} & { view?: FormType | GridType | GalleryType },
any
>({
path: `/api/v1/db/public/shared-view/${sharedViewUuid}/meta`,
method: 'GET', method: 'GET',
format: 'json', format: 'json',
...params, ...params,

104
scripts/sdk/swagger.json

@ -4363,28 +4363,22 @@
"description": "" "description": ""
} }
}, },
"/api/v1/db/public/shared-view/{sharedViewUuid}/meta": { "/api/v1/db/public/shared-base/{sharedBaseUuid}/meta": {
"parameters": [ "parameters": [
{ {
"schema": { "schema": {
"type": "string" "type": "string"
}, },
"name": "sharedViewUuid", "name": "sharedBaseUuid",
"in": "path", "in": "path",
"required": true "required": true
},
{
"schema": {
"type": "string"
},
"in": "header",
"name": "xc-password",
"description": "Shared view password"
} }
], ],
"get": { "get": {
"summary": "", "summary": "",
"operationId": "public-shared-view-meta-get", "operationId": "public-shared-base-get",
"description": "Read project details",
"parameters": [],
"responses": { "responses": {
"200": { "200": {
"description": "OK", "description": "OK",
@ -4392,58 +4386,110 @@
"application/json": { "application/json": {
"schema": { "schema": {
"type": "object", "type": "object",
"properties": {} "properties": {
"project_id": {
"type": "string"
}
}
} }
},
"application/xml": {
"schema": {}
} }
} }
} }
}, },
"tags": [ "tags": [
"Public" "Public"
], ]
"description": "",
"parameters": []
} }
}, },
"/api/v1/db/public/shared-base/{sharedBaseUuid}/meta": { "/api/v1/db/public/shared-view/{sharedViewUuid}/meta": {
"parameters": [ "parameters": [
{ {
"schema": { "schema": {
"type": "string" "type": "string"
}, },
"name": "sharedBaseUuid", "name": "sharedViewUuid",
"in": "path", "in": "path",
"required": true "required": true
},
{
"schema": {
"type": "string"
},
"in": "header",
"name": "xc-password",
"description": "Shared view password"
} }
], ],
"get": { "get": {
"summary": "", "summary": "",
"operationId": "public-shared-base-get", "operationId": "public-shared-view-meta-get",
"description": "Read project details",
"parameters": [],
"responses": { "responses": {
"200": { "200": {
"description": "OK", "description": "OK",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"type": "object", "allOf": [
"properties": { {
"project_id": { "$ref": "#/components/schemas/View"
"type": "string" },
{
"type": "object",
"properties": {
"relatedMetas": {},
"client": {
"type": "string"
},
"columns": {
"oneOf": [
{
"$ref": "#/components/schemas/GridColumn"
},
{
"$ref": "#/components/schemas/FormColumn"
},
{
"$ref": "#/components/schemas/GalleryColumn"
}
]
},
"model": {
"$ref": "#/components/schemas/Table"
}
}
},
{
"properties": {
"view": {
"oneOf": [
{
"$ref": "#/components/schemas/Form"
},
{
"$ref": "#/components/schemas/Grid"
},
{
"$ref": "#/components/schemas/Gallery"
}
]
}
},
"type": "object"
} }
} ]
} }
},
"application/xml": {
"schema": {}
} }
} }
} }
}, },
"tags": [ "tags": [
"Public" "Public"
] ],
"description": "",
"parameters": []
} }
}, },
"/api/v1/db/meta/audits/comments": { "/api/v1/db/meta/audits/comments": {

Loading…
Cancel
Save