OpenApi: move article path parameter to generic type
This commit is contained in:
@@ -54,6 +54,8 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/CitizenResponse'
|
$ref: '#/components/schemas/CitizenResponse'
|
||||||
/citizens/{citizen}:
|
/citizens/{citizen}:
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/citizen'
|
||||||
get:
|
get:
|
||||||
security:
|
security:
|
||||||
- JWTAuth: []
|
- JWTAuth: []
|
||||||
@@ -61,8 +63,6 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- citizen
|
- citizen
|
||||||
operationId: getCitizen
|
operationId: getCitizen
|
||||||
parameters:
|
|
||||||
- $ref: '#/components/parameters/citizen'
|
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: The Citizen object
|
description: The Citizen object
|
||||||
@@ -73,6 +73,8 @@ paths:
|
|||||||
404:
|
404:
|
||||||
description: Citizen not found
|
description: Citizen not found
|
||||||
/citizens/{citizen}/votes:
|
/citizens/{citizen}/votes:
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/citizen'
|
||||||
get:
|
get:
|
||||||
security:
|
security:
|
||||||
- JWTAuth: []
|
- JWTAuth: []
|
||||||
@@ -81,7 +83,6 @@ paths:
|
|||||||
- citizen
|
- citizen
|
||||||
operationId: getCitizenVotes
|
operationId: getCitizenVotes
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/citizen'
|
|
||||||
- name: id
|
- name: id
|
||||||
in: query
|
in: query
|
||||||
required: true
|
required: true
|
||||||
@@ -182,19 +183,13 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ArticleResponse'
|
$ref: '#/components/schemas/ArticleResponse'
|
||||||
/articles/{article}:
|
/articles/{article}:
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/article'
|
||||||
get:
|
get:
|
||||||
summary: Get one article
|
summary: Get one article
|
||||||
tags:
|
tags:
|
||||||
- article
|
- article
|
||||||
operationId: getArticle
|
operationId: getArticle
|
||||||
parameters:
|
|
||||||
- name: article
|
|
||||||
in: path
|
|
||||||
required: true
|
|
||||||
description: the ID of article
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: uuid
|
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: The Article objects
|
description: The Article objects
|
||||||
@@ -203,19 +198,13 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ArticleResponse'
|
$ref: '#/components/schemas/ArticleResponse'
|
||||||
/articles/{article}/versions:
|
/articles/{article}/versions:
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/article'
|
||||||
get:
|
get:
|
||||||
summary: Get all versions of articles
|
summary: Get all versions of articles
|
||||||
tags:
|
tags:
|
||||||
- article
|
- article
|
||||||
operationId: getArticleVersions
|
operationId: getArticleVersions
|
||||||
parameters:
|
|
||||||
- name: article
|
|
||||||
in: path
|
|
||||||
required: true
|
|
||||||
description: the ID of article
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: uuid
|
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: The versions of Article
|
description: The versions of Article
|
||||||
@@ -369,14 +358,7 @@ paths:
|
|||||||
|
|
||||||
/articles/{article}/comments:
|
/articles/{article}/comments:
|
||||||
parameters:
|
parameters:
|
||||||
- name: article
|
- $ref: '#/components/parameters/article'
|
||||||
in: path
|
|
||||||
description: The ID of article
|
|
||||||
example: e74be8e4-6823-47c4-bd1b-789725b2fa8e
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: uuid
|
|
||||||
get:
|
get:
|
||||||
summary: Get comments of one article
|
summary: Get comments of one article
|
||||||
tags:
|
tags:
|
||||||
@@ -447,14 +429,7 @@ paths:
|
|||||||
$ref: '#/components/schemas/CommentResponse'
|
$ref: '#/components/schemas/CommentResponse'
|
||||||
/articles/{article}/follows:
|
/articles/{article}/follows:
|
||||||
parameters:
|
parameters:
|
||||||
- name: article
|
- $ref: '#/components/parameters/article'
|
||||||
in: path
|
|
||||||
description: The ID of article
|
|
||||||
example: e74be8e4-6823-47c4-bd1b-789725b2fa8e
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: uuid
|
|
||||||
post:
|
post:
|
||||||
security:
|
security:
|
||||||
- JWTAuth: []
|
- JWTAuth: []
|
||||||
@@ -503,14 +478,7 @@ paths:
|
|||||||
description: Return only http status 204 on success
|
description: Return only http status 204 on success
|
||||||
/articles/{article}/vote:
|
/articles/{article}/vote:
|
||||||
parameters:
|
parameters:
|
||||||
- name: article
|
- $ref: '#/components/parameters/article'
|
||||||
in: path
|
|
||||||
description: The ID of article
|
|
||||||
example: e74be8e4-6823-47c4-bd1b-789725b2fa8e
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: uuid
|
|
||||||
put:
|
put:
|
||||||
security:
|
security:
|
||||||
- JWTAuth: []
|
- JWTAuth: []
|
||||||
@@ -557,14 +525,7 @@ paths:
|
|||||||
|
|
||||||
/citizens/{citizen}/votes/articles:
|
/citizens/{citizen}/votes/articles:
|
||||||
parameters:
|
parameters:
|
||||||
- name: citizen
|
- $ref: '#/components/parameters/article'
|
||||||
in: path
|
|
||||||
description: The ID of citizen
|
|
||||||
example: 35a0a0eb-56ca-24f5-55f3-e0bac0dd048c
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: uuid
|
|
||||||
get:
|
get:
|
||||||
security:
|
security:
|
||||||
- JWTAuth: []
|
- JWTAuth: []
|
||||||
@@ -646,6 +607,15 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
format: uuid
|
format: uuid
|
||||||
|
|
||||||
|
article:
|
||||||
|
name: article
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
description: the ID of article
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
JWTAuth:
|
JWTAuth:
|
||||||
type: http
|
type: http
|
||||||
|
|||||||
Reference in New Issue
Block a user