Adding in request bodies.
This commit is contained in:
parent
710a340006
commit
1f8da07767
|
@ -848,6 +848,7 @@
|
|||
}
|
||||
},
|
||||
"rowOutput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"row": {
|
||||
"description": "The row to be created/updated, based on the table schema.",
|
||||
|
@ -873,6 +874,15 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"nameSearch": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name to be used when searching - this will be used in a case insensitive starts with match."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -893,6 +903,16 @@
|
|||
"$ref": "#/components/parameters/appId"
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/nameSearch"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Returns the applications that were found based on the search parameters.",
|
||||
|
@ -931,6 +951,16 @@
|
|||
"$ref": "#/components/parameters/appId"
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/application"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Returns the created application.",
|
||||
|
@ -961,6 +991,16 @@
|
|||
"$ref": "#/components/parameters/appIdUrl"
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/application"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Returns the updated application.",
|
||||
|
@ -1047,6 +1087,16 @@
|
|||
"$ref": "#/components/parameters/appId"
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/nameSearch"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Returns the queries found based on the search parameters.",
|
||||
|
@ -1457,16 +1507,11 @@
|
|||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the table, this is a case insensitive search using the provided name as a starts with search."
|
||||
}
|
||||
}
|
||||
"$ref": "#/components/schemas/nameSearch"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1542,9 +1587,9 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/tables/:tableId": {
|
||||
"/tables/{tableId}": {
|
||||
"put": {
|
||||
"summary": "Update the specified table. This can be for internal or external tables.",
|
||||
"summary": "Update the specified table.",
|
||||
"tags": [
|
||||
"tables"
|
||||
],
|
||||
|
@ -1587,9 +1632,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tables/{tableId}": {
|
||||
},
|
||||
"delete": {
|
||||
"summary": "Delete a single table and all of its data.",
|
||||
"tags": [
|
||||
|
@ -1664,6 +1707,16 @@
|
|||
"$ref": "#/components/parameters/appId"
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/nameSearch"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Returns the found users based on search parameters.",
|
||||
|
|
|
@ -633,6 +633,7 @@ components:
|
|||
type: object
|
||||
properties: {}
|
||||
rowOutput:
|
||||
type: object
|
||||
properties:
|
||||
row:
|
||||
description: The row to be created/updated, based on the table schema.
|
||||
|
@ -644,6 +645,13 @@ components:
|
|||
- type: integer
|
||||
- type: array
|
||||
- type: boolean
|
||||
nameSearch:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: The name to be used when searching - this will be used in a case
|
||||
insensitive starts with match.
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
paths:
|
||||
|
@ -654,6 +662,12 @@ paths:
|
|||
- applications
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/appId"
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/nameSearch"
|
||||
responses:
|
||||
"200":
|
||||
description: Returns the applications that were found based on the search
|
||||
|
@ -677,6 +691,12 @@ paths:
|
|||
- applications
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/appId"
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/application"
|
||||
responses:
|
||||
"200":
|
||||
description: Returns the created application.
|
||||
|
@ -694,6 +714,12 @@ paths:
|
|||
- applications
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/appIdUrl"
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/application"
|
||||
responses:
|
||||
"200":
|
||||
description: Returns the updated application.
|
||||
|
@ -743,6 +769,12 @@ paths:
|
|||
- queries
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/appId"
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/nameSearch"
|
||||
responses:
|
||||
"200":
|
||||
description: Returns the queries found based on the search parameters.
|
||||
|
@ -1004,15 +1036,11 @@ paths:
|
|||
parameters:
|
||||
- $ref: "#/components/parameters/appId"
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: The name of the table, this is a case insensitive search using the
|
||||
provided name as a starts with search.
|
||||
$ref: "#/components/schemas/nameSearch"
|
||||
responses:
|
||||
"200":
|
||||
description: Returns the found tables, based on the search parameters.
|
||||
|
@ -1054,9 +1082,9 @@ paths:
|
|||
examples:
|
||||
table:
|
||||
$ref: "#/components/examples/table"
|
||||
/tables/:tableId:
|
||||
"/tables/{tableId}":
|
||||
put:
|
||||
summary: Update the specified table. This can be for internal or external tables.
|
||||
summary: Update the specified table.
|
||||
tags:
|
||||
- tables
|
||||
parameters:
|
||||
|
@ -1080,7 +1108,6 @@ paths:
|
|||
examples:
|
||||
table:
|
||||
$ref: "#/components/examples/table"
|
||||
"/tables/{tableId}":
|
||||
delete:
|
||||
summary: Delete a single table and all of its data.
|
||||
tags:
|
||||
|
@ -1122,6 +1149,12 @@ paths:
|
|||
- users
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/appId"
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/nameSearch"
|
||||
responses:
|
||||
"200":
|
||||
description: Returns the found users based on search parameters.
|
||||
|
|
|
@ -144,44 +144,39 @@ exports.table = {
|
|||
},
|
||||
}
|
||||
|
||||
exports.query = {
|
||||
type: "object",
|
||||
properties: {},
|
||||
function object(props) {
|
||||
return {
|
||||
type: "object",
|
||||
properties: props,
|
||||
}
|
||||
}
|
||||
|
||||
exports.user = {
|
||||
type: "object",
|
||||
properties: {},
|
||||
}
|
||||
exports.query = object({})
|
||||
|
||||
exports.application = {
|
||||
type: "object",
|
||||
properties: {},
|
||||
}
|
||||
exports.user = object({})
|
||||
|
||||
exports.applicationOutput = {
|
||||
type: "object",
|
||||
properties: {
|
||||
application: exports.application,
|
||||
exports.application = object({})
|
||||
|
||||
exports.applicationOutput = object({
|
||||
application: exports.application,
|
||||
})
|
||||
|
||||
exports.tableOutput = object({
|
||||
table: exports.table,
|
||||
})
|
||||
|
||||
exports.userOutput = object({
|
||||
user: exports.user,
|
||||
})
|
||||
|
||||
exports.rowOutput = object({
|
||||
row: exports.row,
|
||||
})
|
||||
|
||||
exports.nameSearch = object({
|
||||
name: {
|
||||
type: "string",
|
||||
description:
|
||||
"The name to be used when searching - this will be used in a case insensitive starts with match.",
|
||||
},
|
||||
}
|
||||
|
||||
exports.tableOutput = {
|
||||
type: "object",
|
||||
properties: {
|
||||
table: exports.table,
|
||||
},
|
||||
}
|
||||
|
||||
exports.userOutput = {
|
||||
type: "object",
|
||||
properties: {
|
||||
user: exports.user,
|
||||
},
|
||||
}
|
||||
|
||||
exports.rowOutput = {
|
||||
properties: {
|
||||
row: exports.row,
|
||||
},
|
||||
}
|
||||
})
|
||||
|
|
|
@ -12,6 +12,12 @@ const router = Router()
|
|||
* - applications
|
||||
* parameters:
|
||||
* - $ref: '#/components/parameters/appId'
|
||||
* requestBody:
|
||||
* required: true
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: '#/components/schemas/nameSearch'
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Returns the applications that were found based on the search parameters.
|
||||
|
@ -39,6 +45,12 @@ router.post("/applications/search", controller.search)
|
|||
* - applications
|
||||
* parameters:
|
||||
* - $ref: '#/components/parameters/appId'
|
||||
* requestBody:
|
||||
* required: true
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: '#/components/schemas/application'
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Returns the created application.
|
||||
|
@ -61,6 +73,12 @@ router.post("/applications", controller.create)
|
|||
* - applications
|
||||
* parameters:
|
||||
* - $ref: '#/components/parameters/appIdUrl'
|
||||
* requestBody:
|
||||
* required: true
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: '#/components/schemas/application'
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Returns the updated application.
|
||||
|
|
|
@ -12,6 +12,12 @@ const router = Router()
|
|||
* - queries
|
||||
* parameters:
|
||||
* - $ref: '#/components/parameters/appId'
|
||||
* requestBody:
|
||||
* required: true
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: '#/components/schemas/nameSearch'
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Returns the queries found based on the search parameters.
|
||||
|
|
|
@ -13,15 +13,11 @@ const router = Router()
|
|||
* parameters:
|
||||
* - $ref: '#/components/parameters/appId'
|
||||
* requestBody:
|
||||
* required: true
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* type: object
|
||||
* properties:
|
||||
* name:
|
||||
* type: string
|
||||
* description: The name of the table, this is a case insensitive search using the provided
|
||||
* name as a starts with search.
|
||||
* $ref: '#/components/schemas/nameSearch'
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Returns the found tables, based on the search parameters.
|
||||
|
@ -73,9 +69,9 @@ router.post("/tables", controller.create)
|
|||
|
||||
/**
|
||||
* @openapi
|
||||
* /tables/:tableId:
|
||||
* /tables/{tableId}:
|
||||
* put:
|
||||
* summary: Update the specified table. This can be for internal or external tables.
|
||||
* summary: Update the specified table.
|
||||
* tags:
|
||||
* - tables
|
||||
* parameters:
|
||||
|
|
|
@ -12,6 +12,12 @@ const router = Router()
|
|||
* - users
|
||||
* parameters:
|
||||
* - $ref: '#/components/parameters/appId'
|
||||
* requestBody:
|
||||
* required: true
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: '#/components/schemas/nameSearch'
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Returns the found users based on search parameters.
|
||||
|
|
Loading…
Reference in New Issue