forked from tsai/budibase
11 changed files with 696 additions and 53 deletions
@ -0,0 +1,15 @@ |
|||
exports.search = () => { |
|||
|
|||
} |
|||
|
|||
exports.create = () => { |
|||
|
|||
} |
|||
|
|||
exports.update = () => { |
|||
|
|||
} |
|||
|
|||
exports.delete = () => { |
|||
|
|||
} |
|||
@ -0,0 +1,15 @@ |
|||
exports.search = () => { |
|||
|
|||
} |
|||
|
|||
exports.create = () => { |
|||
|
|||
} |
|||
|
|||
exports.update = () => { |
|||
|
|||
} |
|||
|
|||
exports.delete = () => { |
|||
|
|||
} |
|||
@ -1,5 +1,84 @@ |
|||
const Router = require("@koa/router") |
|||
const controller = require("../../controllers/public/applications") |
|||
|
|||
const router = Router() |
|||
|
|||
/** |
|||
* @openapi |
|||
* /applications/search: |
|||
* post: |
|||
* summary: Search for an application based on its app name. |
|||
* tags: |
|||
* - applications |
|||
* parameters: |
|||
* - $ref: '#/components/parameters/appId' |
|||
* responses: |
|||
* 200: |
|||
* description: Returns the applications that were found based on the search parameters. |
|||
* content: |
|||
* application/json: |
|||
* schema: |
|||
* type: array |
|||
* items: |
|||
* $ref: '#/components/schemas/application' |
|||
*/ |
|||
router.post("/applications/search", controller.search) |
|||
|
|||
/** |
|||
* @openapi |
|||
* /applications: |
|||
* post: |
|||
* summary: Create a new application. |
|||
* tags: |
|||
* - applications |
|||
* parameters: |
|||
* - $ref: '#/components/parameters/appId' |
|||
* responses: |
|||
* 200: |
|||
* description: Returns the created application. |
|||
* content: |
|||
* application/json: |
|||
* schema: |
|||
* type: object |
|||
*/ |
|||
router.post("/applications", controller.create) |
|||
|
|||
/** |
|||
* @openapi |
|||
* /applications/{appId}: |
|||
* put: |
|||
* summary: Update an existing application by its ID. |
|||
* tags: |
|||
* - applications |
|||
* parameters: |
|||
* - $ref: '#/components/parameters/appIdUrl' |
|||
* responses: |
|||
* 200: |
|||
* description: Returns the updated application. |
|||
* content: |
|||
* application/json: |
|||
* schema: |
|||
* type: object |
|||
*/ |
|||
router.put("/applications/:appId", controller.update) |
|||
|
|||
/** |
|||
* @openapi |
|||
* /applications/{appId}: |
|||
* delete: |
|||
* summary: Delete an existing application by its ID. |
|||
* tags: |
|||
* - applications |
|||
* parameters: |
|||
* - $ref: '#/components/parameters/appIdUrl' |
|||
* responses: |
|||
* 200: |
|||
* description: Returns the deleted application. |
|||
* content: |
|||
* application/json: |
|||
* schema: |
|||
* type: object |
|||
*/ |
|||
router.delete("/applications/:appId", controller.delete) |
|||
|
|||
module.exports = router |
|||
|
|||
@ -1,5 +1,86 @@ |
|||
const Router = require("@koa/router") |
|||
const controller = require("../../controllers/public/users") |
|||
|
|||
const router = Router() |
|||
|
|||
/** |
|||
* @openapi |
|||
* /users/search: |
|||
* post: |
|||
* summary: Search for a user based on their email/username. |
|||
* tags: |
|||
* - users |
|||
* parameters: |
|||
* - $ref: '#/components/parameters/appId' |
|||
* responses: |
|||
* 200: |
|||
* description: Returns the found users based on search parameters. |
|||
* content: |
|||
* application/json: |
|||
* schema: |
|||
* type: array |
|||
* items: |
|||
* $ref: '#/components/schemas/user' |
|||
*/ |
|||
router.post("/users/search", controller.search) |
|||
|
|||
/** |
|||
* @openapi |
|||
* /users: |
|||
* post: |
|||
* summary: Create a new user in the Budibase portal. |
|||
* tags: |
|||
* - users |
|||
* parameters: |
|||
* - $ref: '#/components/parameters/appId' |
|||
* responses: |
|||
* 200: |
|||
* description: Returns the created user. |
|||
* content: |
|||
* application/json: |
|||
* schema: |
|||
* type: object |
|||
*/ |
|||
router.post("/users", controller.create) |
|||
|
|||
/** |
|||
* @openapi |
|||
* /users/{userId}: |
|||
* put: |
|||
* summary: Update an existing user by their ID. |
|||
* tags: |
|||
* - users |
|||
* parameters: |
|||
* - $ref: '#/components/parameters/userId' |
|||
* - $ref: '#/components/parameters/appId' |
|||
* responses: |
|||
* 200: |
|||
* description: Returns the updated user. |
|||
* content: |
|||
* application/json: |
|||
* schema: |
|||
* type: object |
|||
*/ |
|||
router.put("/users/:userId", controller.update) |
|||
|
|||
/** |
|||
* @openapi |
|||
* /users/{userId}: |
|||
* delete: |
|||
* summary: Delete an existing user by their ID. |
|||
* tags: |
|||
* - users |
|||
* parameters: |
|||
* - $ref: '#/components/parameters/userId' |
|||
* - $ref: '#/components/parameters/appId' |
|||
* responses: |
|||
* 200: |
|||
* description: Returns the deleted user. |
|||
* content: |
|||
* application/json: |
|||
* schema: |
|||
* type: object |
|||
*/ |
|||
router.delete("/users/:userId", controller.delete) |
|||
|
|||
module.exports = router |
|||
|
|||
Loading…
Reference in new issue