Browse Source

chore: cleanup swagger

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/6470/head
Pranav C 1 year ago
parent
commit
52584126ab
  1. 126
      packages/nocodb-sdk/src/lib/Api.ts
  2. 164
      packages/nocodb/src/schema/swagger.json

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

@ -10661,132 +10661,6 @@ export class Api<
...params, ...params,
}), }),
/**
* @description Create a new row in a given table and project.
*
* @tags DB Data Table Row
* @name Create2
* @summary Create Table Rows
* @request POST:/api/v1/tables/{tableId}/rows/{rowId}
* @originalName create
* @duplicate
* @response `200` `any` OK
* @response `400` `{
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
msg: string,
}`
*/
create2: (
tableId: string,
rowId: string,
query: {
/** View ID */
viewId: string;
},
data: object | object[],
params: RequestParams = {}
) =>
this.request<
any,
{
/** @example BadRequest [Error]: <ERROR MESSAGE> */
msg: string;
}
>({
path: `/api/v1/tables/${tableId}/rows/${rowId}`,
method: 'POST',
query: query,
body: data,
type: ContentType.Json,
format: 'json',
...params,
}),
/**
* @description Create a new row in a given table and project.
*
* @tags DB Data Table Row
* @name Update2
* @summary Update Table Rows
* @request PUT:/api/v1/tables/{tableId}/rows/{rowId}
* @originalName update
* @duplicate
* @response `200` `any` OK
* @response `400` `{
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
msg: string,
}`
*/
update2: (
tableId: string,
rowId: string,
query: {
/** View ID */
viewId: string;
},
data: object | object[],
params: RequestParams = {}
) =>
this.request<
any,
{
/** @example BadRequest [Error]: <ERROR MESSAGE> */
msg: string;
}
>({
path: `/api/v1/tables/${tableId}/rows/${rowId}`,
method: 'PUT',
query: query,
body: data,
type: ContentType.Json,
format: 'json',
...params,
}),
/**
* @description Create a new row in a given table and project.
*
* @tags DB Data Table Row
* @name Delete2
* @summary Delete Table Rows
* @request DELETE:/api/v1/tables/{tableId}/rows/{rowId}
* @originalName delete
* @duplicate
* @response `200` `any` OK
* @response `400` `{
\** @example BadRequest [Error]: <ERROR MESSAGE> *\
msg: string,
}`
*/
delete2: (
tableId: string,
rowId: string,
query: {
/** View ID */
viewId: string;
},
data: object | object[],
params: RequestParams = {}
) =>
this.request<
any,
{
/** @example BadRequest [Error]: <ERROR MESSAGE> */
msg: string;
}
>({
path: `/api/v1/tables/${tableId}/rows/${rowId}`,
method: 'DELETE',
query: query,
body: data,
type: ContentType.Json,
format: 'json',
...params,
}),
/** /**
* @description Count of rows in a given table * @description Count of rows in a given table
* *

164
packages/nocodb/src/schema/swagger.json

@ -15788,170 +15788,6 @@
"$ref": "#/components/responses/BadRequest" "$ref": "#/components/responses/BadRequest"
} }
} }
},
"post": {
"summary": "Create Table Rows",
"operationId": "db-data-table-row-create",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
}
},
"tags": [
"DB Data Table Row"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object"
},
{
"type": "array",
"items": {
"type": "object"
}
}
]
},
"examples": {
"Example 1": {
"value": {
"Id": 1,
"Title": "foo",
"CreatedAt": "2023-03-11T09:10:53.567Z",
"UpdatedAt": "2023-03-11T09:10:53.567Z"
}
}
}
}
}
},
"description": "Create a new row in a given table and project.",
"parameters": [
{
"$ref": "#/components/parameters/xc-auth"
}
]
},
"put": {
"summary": "Update Table Rows",
"operationId": "db-data-table-row-update",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
}
},
"tags": [
"DB Data Table Row"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object"
},
{
"type": "array",
"items": {
"type": "object"
}
}
]
},
"examples": {
"Example 1": {
"value": {
"Id": 1,
"Title": "foo",
"CreatedAt": "2023-03-11T09:10:53.567Z",
"UpdatedAt": "2023-03-11T09:10:53.567Z"
}
}
}
}
}
},
"description": "Create a new row in a given table and project.",
"parameters": [
{
"$ref": "#/components/parameters/xc-auth"
}
]
},
"delete": {
"summary": "Delete Table Rows",
"operationId": "db-data-table-row-delete",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
}
},
"tags": [
"DB Data Table Row"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"type": "object"
},
{
"type": "array",
"items": {
"type": "object"
}
}
]
},
"examples": {
"Example 1": {
"value": [
{
"Id": 1
}
]
}
}
}
}
},
"description": "Create a new row in a given table and project.",
"parameters": [
{
"$ref": "#/components/parameters/xc-auth"
}
]
} }
}, },
"/api/v1/tables/{tableId}/rows/count": { "/api/v1/tables/{tableId}/rows/count": {

Loading…
Cancel
Save