add 401 to OpenAPI
This commit is contained in:
@@ -100,6 +100,8 @@ paths:
|
|||||||
$ref: '#/components/schemas/CitizenResponse'
|
$ref: '#/components/schemas/CitizenResponse'
|
||||||
404:
|
404:
|
||||||
description: Citizen not found
|
description: Citizen not found
|
||||||
|
401:
|
||||||
|
$ref: '#/components/responses/401'
|
||||||
/citizens/{citizen}/votes:
|
/citizens/{citizen}/votes:
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/citizen'
|
- $ref: '#/components/parameters/citizen'
|
||||||
@@ -123,7 +125,6 @@ paths:
|
|||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
format: uuid
|
format: uuid
|
||||||
|
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: The Votes objects
|
description: The Votes objects
|
||||||
@@ -135,6 +136,8 @@ paths:
|
|||||||
$ref: '#/components/schemas/VoteResponse'
|
$ref: '#/components/schemas/VoteResponse'
|
||||||
404:
|
404:
|
||||||
description: Citizen not found
|
description: Citizen not found
|
||||||
|
401:
|
||||||
|
$ref: '#/components/responses/401'
|
||||||
/citizens/{citizen}/password/change:
|
/citizens/{citizen}/password/change:
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/citizen'
|
- $ref: '#/components/parameters/citizen'
|
||||||
@@ -157,12 +160,13 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
example:
|
example:
|
||||||
qwerty
|
qwerty
|
||||||
|
|
||||||
responses:
|
responses:
|
||||||
201:
|
201:
|
||||||
description: Password changed
|
description: Password changed
|
||||||
404:
|
404:
|
||||||
description: Citizen not found
|
description: Citizen not found
|
||||||
|
401:
|
||||||
|
$ref: '#/components/responses/401'
|
||||||
|
|
||||||
/citizens:
|
/citizens:
|
||||||
get:
|
get:
|
||||||
@@ -192,6 +196,8 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/CitizenResponse'
|
$ref: '#/components/schemas/CitizenResponse'
|
||||||
|
401:
|
||||||
|
$ref: '#/components/responses/401'
|
||||||
|
|
||||||
/articles:
|
/articles:
|
||||||
get:
|
get:
|
||||||
@@ -239,6 +245,8 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ArticleResponse'
|
$ref: '#/components/schemas/ArticleResponse'
|
||||||
|
401:
|
||||||
|
$ref: '#/components/responses/401'
|
||||||
/articles/{article}:
|
/articles/{article}:
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/article'
|
- $ref: '#/components/parameters/article'
|
||||||
@@ -323,6 +331,8 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ConstitutionResponse'
|
$ref: '#/components/schemas/ConstitutionResponse'
|
||||||
|
401:
|
||||||
|
$ref: '#/components/responses/401'
|
||||||
/constitutions/{constitution}:
|
/constitutions/{constitution}:
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/constitution'
|
- $ref: '#/components/parameters/constitution'
|
||||||
@@ -370,6 +380,8 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/CommentResponse'
|
$ref: '#/components/schemas/CommentResponse'
|
||||||
|
401:
|
||||||
|
$ref: '#/components/responses/401'
|
||||||
|
|
||||||
/comments/{comment}/children:
|
/comments/{comment}/children:
|
||||||
parameters:
|
parameters:
|
||||||
@@ -427,6 +439,8 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/CommentResponse'
|
$ref: '#/components/schemas/CommentResponse'
|
||||||
|
401:
|
||||||
|
$ref: '#/components/responses/401'
|
||||||
/constitutions/{constitution}/comments:
|
/constitutions/{constitution}/comments:
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/constitution'
|
- $ref: '#/components/parameters/constitution'
|
||||||
@@ -461,6 +475,8 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/CommentResponse'
|
$ref: '#/components/schemas/CommentResponse'
|
||||||
|
401:
|
||||||
|
$ref: '#/components/responses/401'
|
||||||
|
|
||||||
/articles/{article}/follows:
|
/articles/{article}/follows:
|
||||||
parameters:
|
parameters:
|
||||||
@@ -485,6 +501,8 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
204:
|
204:
|
||||||
description: Return only http status 204 on success
|
description: Return only http status 204 on success
|
||||||
|
401:
|
||||||
|
$ref: '#/components/responses/401'
|
||||||
/constitutions/{constitution}/follows:
|
/constitutions/{constitution}/follows:
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/constitution'
|
- $ref: '#/components/parameters/constitution'
|
||||||
@@ -498,6 +516,8 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
201:
|
201:
|
||||||
description: Return only http status 201 on success
|
description: Return only http status 201 on success
|
||||||
|
401:
|
||||||
|
$ref: '#/components/responses/401'
|
||||||
delete:
|
delete:
|
||||||
security:
|
security:
|
||||||
- JWTAuth: []
|
- JWTAuth: []
|
||||||
@@ -508,6 +528,8 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
204:
|
204:
|
||||||
description: Return only http status 204 on success
|
description: Return only http status 204 on success
|
||||||
|
401:
|
||||||
|
$ref: '#/components/responses/401'
|
||||||
|
|
||||||
/articles/{article}/vote:
|
/articles/{article}/vote:
|
||||||
parameters:
|
parameters:
|
||||||
@@ -527,11 +549,12 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
201:
|
201:
|
||||||
description: Return only http status 201 on success
|
description: Return only http status 201 on success
|
||||||
|
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/VoteAggregation'
|
$ref: '#/components/schemas/VoteAggregation'
|
||||||
|
401:
|
||||||
|
$ref: '#/components/responses/401'
|
||||||
/constitutions/{constitution}/vote:
|
/constitutions/{constitution}/vote:
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/constitution'
|
- $ref: '#/components/parameters/constitution'
|
||||||
@@ -572,8 +595,8 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/VoteAggregation'
|
$ref: '#/components/schemas/VoteAggregation'
|
||||||
404:
|
401:
|
||||||
description: article or comment not found
|
$ref: '#/components/responses/401'
|
||||||
|
|
||||||
|
|
||||||
/citizens/{citizen}/votes/articles:
|
/citizens/{citizen}/votes/articles:
|
||||||
@@ -601,6 +624,8 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/VoteResponse'
|
$ref: '#/components/schemas/VoteResponse'
|
||||||
|
401:
|
||||||
|
$ref: '#/components/responses/401'
|
||||||
/citizens/{citizen}/comments/articles:
|
/citizens/{citizen}/comments/articles:
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/citizen'
|
- $ref: '#/components/parameters/citizen'
|
||||||
@@ -626,8 +651,17 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/CommentResponse'
|
$ref: '#/components/schemas/CommentResponse'
|
||||||
|
401:
|
||||||
|
$ref: '#/components/responses/401'
|
||||||
|
|
||||||
components:
|
components:
|
||||||
|
responses:
|
||||||
|
401:
|
||||||
|
description: Unautorized
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
description: noting
|
||||||
parameters:
|
parameters:
|
||||||
page:
|
page:
|
||||||
name: page
|
name: page
|
||||||
|
|||||||
Reference in New Issue
Block a user