Merge pull request #5140 from Budibase/fix/5117
Fix for query public API spec - was missing description of parameters property
This commit is contained in:
commit
e9b382adc8
4 changed files with 82 additions and 14 deletions
|
@ -1260,12 +1260,32 @@
|
|||
]
|
||||
},
|
||||
"executeQuery": {
|
||||
"description": "The query body must contain the required parameters for the query, this depends on query type, setup and bindings.",
|
||||
"description": "The parameters required for executing a query.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"description": "This contains the required parameters for the query, this depends on query type, setup and bindings.",
|
||||
"additionalProperties": {
|
||||
"description": "Key value properties of any type, depending on the query output schema."
|
||||
}
|
||||
},
|
||||
"pagination": {
|
||||
"type": "object",
|
||||
"description": "For supported query types (currently on REST) pagination can be performed using these properties.",
|
||||
"properties": {
|
||||
"page": {
|
||||
"type": "string",
|
||||
"description": "The page which has been returned from a previous query."
|
||||
},
|
||||
"limit": {
|
||||
"type": "number",
|
||||
"description": "The number of rows to return per page."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"executeQueryOutput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
@ -951,11 +951,27 @@ components:
|
|||
required:
|
||||
- data
|
||||
executeQuery:
|
||||
description: The query body must contain the required parameters for the query,
|
||||
this depends on query type, setup and bindings.
|
||||
description: The parameters required for executing a query.
|
||||
type: object
|
||||
properties:
|
||||
parameters:
|
||||
type: object
|
||||
description: This contains the required parameters for the query, this depends
|
||||
on query type, setup and bindings.
|
||||
additionalProperties:
|
||||
description: Key value properties of any type, depending on the query output schema.
|
||||
description: Key value properties of any type, depending on the query output
|
||||
schema.
|
||||
pagination:
|
||||
type: object
|
||||
description: For supported query types (currently on REST) pagination can be
|
||||
performed using these properties.
|
||||
properties:
|
||||
page:
|
||||
type: string
|
||||
description: The page which has been returned from a previous query.
|
||||
limit:
|
||||
type: number
|
||||
description: The number of rows to return per page.
|
||||
executeQueryOutput:
|
||||
type: object
|
||||
properties:
|
||||
|
|
|
@ -124,13 +124,35 @@ const querySchema = object(
|
|||
)
|
||||
|
||||
const executeQuerySchema = {
|
||||
description:
|
||||
"The query body must contain the required parameters for the query, this depends on query type, setup and bindings.",
|
||||
description: "The parameters required for executing a query.",
|
||||
type: "object",
|
||||
properties: {
|
||||
parameters: {
|
||||
type: "object",
|
||||
description:
|
||||
"This contains the required parameters for the query, this depends on query type, setup and bindings.",
|
||||
additionalProperties: {
|
||||
description:
|
||||
"Key value properties of any type, depending on the query output schema.",
|
||||
},
|
||||
},
|
||||
pagination: {
|
||||
type: "object",
|
||||
description:
|
||||
"For supported query types (currently on REST) pagination can be performed using these properties.",
|
||||
properties: {
|
||||
page: {
|
||||
type: "string",
|
||||
description:
|
||||
"The page which has been returned from a previous query.",
|
||||
},
|
||||
limit: {
|
||||
type: "number",
|
||||
description: "The number of rows to return per page.",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
const executeQueryOutputSchema = object(
|
||||
|
|
|
@ -935,8 +935,18 @@ export interface components {
|
|||
_id: string;
|
||||
}[];
|
||||
};
|
||||
/** @description The query body must contain the required parameters for the query, this depends on query type, setup and bindings. */
|
||||
executeQuery: { [key: string]: unknown };
|
||||
/** @description The parameters required for executing a query. */
|
||||
executeQuery: {
|
||||
/** @description This contains the required parameters for the query, this depends on query type, setup and bindings. */
|
||||
parameters?: { [key: string]: unknown };
|
||||
/** @description For supported query types (currently on REST) pagination can be performed using these properties. */
|
||||
pagination?: {
|
||||
/** @description The page which has been returned from a previous query. */
|
||||
page?: string;
|
||||
/** @description The number of rows to return per page. */
|
||||
limit?: number;
|
||||
};
|
||||
};
|
||||
executeQueryOutput: {
|
||||
/** @description The data response from the query. */
|
||||
data: { [key: string]: unknown }[];
|
||||
|
|
Loading…
Reference in a new issue