diff options
Diffstat (limited to 'src/files')
-rw-r--r-- | src/files/SwaggerUI.yaml | 206 |
1 files changed, 206 insertions, 0 deletions
diff --git a/src/files/SwaggerUI.yaml b/src/files/SwaggerUI.yaml new file mode 100644 index 0000000..019ca5e --- /dev/null +++ b/src/files/SwaggerUI.yaml @@ -0,0 +1,206 @@ +openapi: 3.0.0 +info: + title: Converted from Thread.yaml with typeconv + version: '1' + x-id: Thread.yaml + x-comment: >- + Generated from src/models/Thread.ts by core-types-json-schema + (https://github.com/grantila/core-types-json-schema) on behalf of typeconv + (https://github.com/grantila/typeconv) +paths: + /custom: + post: + summary: Run a custom sql query + responses: + '200': + description: Success + '500': + description: Failed + requestBody: + descripton: The command to run + content: + text/plain: + schema: + title: Command + type: string + /boards: + get: + summary: Get boards + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + type: string + '404': + description: Not Found + /boards/{board}: + post: + summary: Creat a new board + parameters: + - name: board + in: path + required: true + schema: + type: string + responses: + '200': + description: Success + '500': + description: Failed + /board/{board}: + get: + summary: Get threads in board + parameters: + - name: board + in: path + required: true + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Thread' + '404': + description: Not Found + post: + summary: Post a thread + parameters: + - name: board + in: path + required: true + schema: + type: string + requestBody: + description: Thread to post + content: + application/json: + schema: + $ref: '#/components/schemas/Thread' + responses: + '200': + description: Success + '500': + description: Failed + + /board/{board}/{tid}: + get: + summary: Get a thread + parameters: + - name: board + in: path + required: true + schema: + type: string + - name: tid + in: path + required: true + schema: + type: string + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Thread' + '404': + description: Not Found + post: + summary: Post a comment + parameters: + - name: board + in: path + required: true + schema: + type: string + - name: tid + in: path + required: true + schema: + type: string + requestBody: + descriptors: The comment to post + content: + application/json: + schema: + $ref: '#components/schemas/Comment' + responses: + '200': + description: Success + '500': + description: Failed + +components: + schemas: + Comment: + properties: + id: + title: Comment.id + type: string + timestamp: + title: Comment.timestamp + type: number + content: + title: Comment.content + type: string + image: + title: Comment.image + type: string + imagetype: + title: Comment.imagetype + type: string + required: + - id + - timestamp + - content + - image + - imagetype + additionalProperties: false + title: Comment + type: object + Thread: + properties: + id: + title: Thread.id + type: string + timestamp: + title: Thread.timestamp + type: number + title: + title: Thread.title + type: string + content: + title: Thread.content + type: string + comments: + items: + $ref: '#/components/schemas/Comment' + title: Thread.comments.[] + title: Thread.comments + type: array + image: + title: Thread.image + type: string + imagetype: + title: Thread.imagetype + type: string + required: + - id + - title + - contnet + - comments + - timestamp + - image + - imageType + additionalProperties: false + title: Thread + type: object |