|
|
@ -28,7 +28,7 @@ export const getModelPaths = async (ctx: { |
|
|
|
[`/api/v1/db/data/${ctx.orgs}/${ctx.projectName}/${ctx.tableName}`]: { |
|
|
|
[`/api/v1/db/data/${ctx.orgs}/${ctx.projectName}/${ctx.tableName}`]: { |
|
|
|
get: { |
|
|
|
get: { |
|
|
|
summary: `${ctx.tableName} list`, |
|
|
|
summary: `${ctx.tableName} list`, |
|
|
|
operationId: 'db-table-row-list', |
|
|
|
operationId: `${ctx.tableName.toLowerCase()}-db-table-row-list`, |
|
|
|
description: `List of all rows from ${ctx.tableName} ${ctx.type} and response data fields can be filtered based on query params.`, |
|
|
|
description: `List of all rows from ${ctx.tableName} ${ctx.type} and response data fields can be filtered based on query params.`, |
|
|
|
tags: [ctx.tableName], |
|
|
|
tags: [ctx.tableName], |
|
|
|
parameters: [ |
|
|
|
parameters: [ |
|
|
@ -172,7 +172,7 @@ export const getModelPaths = async (ctx: { |
|
|
|
{ |
|
|
|
{ |
|
|
|
get: { |
|
|
|
get: { |
|
|
|
summary: `${ctx.tableName} find-one`, |
|
|
|
summary: `${ctx.tableName} find-one`, |
|
|
|
operationId: 'db-table-row-find-one', |
|
|
|
operationId: `${ctx.tableName.toLowerCase()}-db-table-row-find-one`, |
|
|
|
description: `Find first record matching the conditions.`, |
|
|
|
description: `Find first record matching the conditions.`, |
|
|
|
tags: [ctx.tableName], |
|
|
|
tags: [ctx.tableName], |
|
|
|
parameters: [fieldsParam, whereParam, sortParam], |
|
|
|
parameters: [fieldsParam, whereParam, sortParam], |
|
|
@ -349,13 +349,6 @@ export const getModelPaths = async (ctx: { |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
tags: [ctx.tableName], |
|
|
|
tags: [ctx.tableName], |
|
|
|
requestBody: { |
|
|
|
|
|
|
|
content: { |
|
|
|
|
|
|
|
'application/json': { |
|
|
|
|
|
|
|
schema: {}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -464,7 +457,6 @@ export const getModelPaths = async (ctx: { |
|
|
|
description: |
|
|
|
description: |
|
|
|
'Export all the records from a table.Currently we are only supports `csv` export.', |
|
|
|
'Export all the records from a table.Currently we are only supports `csv` export.', |
|
|
|
tags: [ctx.tableName], |
|
|
|
tags: [ctx.tableName], |
|
|
|
wrapped: true, |
|
|
|
|
|
|
|
responses: { |
|
|
|
responses: { |
|
|
|
'200': { |
|
|
|
'200': { |
|
|
|
description: 'OK', |
|
|
|
description: 'OK', |
|
|
@ -562,7 +554,7 @@ export const getViewPaths = async (ctx: { |
|
|
|
schema: { |
|
|
|
schema: { |
|
|
|
type: 'object', |
|
|
|
type: 'object', |
|
|
|
properties: { |
|
|
|
properties: { |
|
|
|
count: 'number', |
|
|
|
count: { type: 'number' }, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
@ -645,7 +637,6 @@ export const getViewPaths = async (ctx: { |
|
|
|
description: |
|
|
|
description: |
|
|
|
'Export all the records from a table view. Currently we are only supports `csv` export.', |
|
|
|
'Export all the records from a table view. Currently we are only supports `csv` export.', |
|
|
|
tags: [`${ctx.viewName} ( ${ctx.tableName} grid )`], |
|
|
|
tags: [`${ctx.viewName} ( ${ctx.tableName} grid )`], |
|
|
|
wrapped: true, |
|
|
|
|
|
|
|
responses: { |
|
|
|
responses: { |
|
|
|
'200': { |
|
|
|
'200': { |
|
|
|
description: 'OK', |
|
|
|
description: 'OK', |
|
|
|