Test openapi schema of /comments/{comment}

This commit is contained in:
2021-03-17 18:09:05 +01:00
parent 07ae50c40a
commit ca402dbea7
4 changed files with 75 additions and 2 deletions

View File

@@ -533,7 +533,20 @@ paths:
$ref: '#/components/schemas/CommentResponse'
401:
$ref: '#/components/responses/401'
/comments/{comment}:
parameters:
- $ref: '#/components/parameters/comment'
get:
summary: Get Comment by Comment ID
tags:
- comment
responses:
200:
description: Return Comment and children
content:
application/json:
schema:
$ref: '#/components/schemas/CommentResponse'
components:
parameters:
page:
@@ -626,6 +639,16 @@ components:
type: string
format: uuid
comment:
name: comment
in: path
description: The ID of comment
example: 701dc504-db49-7e3a-2c0a-32542507ea57
required: true
schema:
type: string
format: uuid
responses:
401:
description: Unautorized
@@ -908,6 +931,7 @@ components:
- createdBy
- votes
- target
- childrenCount
properties:
id:
$ref: '#/components/schemas/UUID'
@@ -934,6 +958,9 @@ components:
$ref: '#/components/schemas/UUID'
reference:
type: string
childrenCount:
type: integer
minimum: 0
votes:
properties:
up: