OpenApi: move constitution path parameter to generic type
This commit is contained in:
@@ -267,19 +267,13 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/ConstitutionResponse'
|
$ref: '#/components/schemas/ConstitutionResponse'
|
||||||
/constitutions/{constitution}:
|
/constitutions/{constitution}:
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/constitution'
|
||||||
get:
|
get:
|
||||||
summary: Get all constitutions
|
summary: Get all constitutions
|
||||||
tags:
|
tags:
|
||||||
- constitution
|
- constitution
|
||||||
operationId: getConstitutions
|
operationId: getConstitutions
|
||||||
parameters:
|
|
||||||
- name: constitution
|
|
||||||
in: query
|
|
||||||
required: true
|
|
||||||
description: the ID of constitution
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: uuid
|
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: The Constitution objects
|
description: The Constitution objects
|
||||||
@@ -390,14 +384,7 @@ paths:
|
|||||||
$ref: '#/components/schemas/CommentResponse'
|
$ref: '#/components/schemas/CommentResponse'
|
||||||
/constitutions/{constitution}/comments:
|
/constitutions/{constitution}/comments:
|
||||||
parameters:
|
parameters:
|
||||||
- name: constitution
|
- $ref: '#/components/parameters/constitution'
|
||||||
in: path
|
|
||||||
description: The ID of constitution
|
|
||||||
example: e74be8e4-6823-47c4-bd1b-789725b2fa8e
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: uuid
|
|
||||||
get:
|
get:
|
||||||
summary: Get comment and children of one constitution
|
summary: Get comment and children of one constitution
|
||||||
tags:
|
tags:
|
||||||
@@ -450,14 +437,7 @@ paths:
|
|||||||
description: Return only http status 204 on success
|
description: Return only http status 204 on success
|
||||||
/constitutions/{constitution}/follows:
|
/constitutions/{constitution}/follows:
|
||||||
parameters:
|
parameters:
|
||||||
- name: constitution
|
- $ref: '#/components/parameters/constitution'
|
||||||
in: path
|
|
||||||
description: The ID of constitution
|
|
||||||
example: e74be8e4-6823-47c4-bd1b-789725b2fa8e
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: uuid
|
|
||||||
post:
|
post:
|
||||||
security:
|
security:
|
||||||
- JWTAuth: []
|
- JWTAuth: []
|
||||||
@@ -500,14 +480,7 @@ paths:
|
|||||||
$ref: '#/components/schemas/VoteAggregation'
|
$ref: '#/components/schemas/VoteAggregation'
|
||||||
/constitutions/{constitution}/vote:
|
/constitutions/{constitution}/vote:
|
||||||
parameters:
|
parameters:
|
||||||
- name: constitution
|
- $ref: '#/components/parameters/constitution'
|
||||||
in: path
|
|
||||||
description: The ID of constitution
|
|
||||||
example: e74be8e4-6823-47c4-bd1b-789725b2fa8e
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: uuid
|
|
||||||
put:
|
put:
|
||||||
security:
|
security:
|
||||||
- JWTAuth: []
|
- JWTAuth: []
|
||||||
@@ -616,6 +589,16 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
format: uuid
|
format: uuid
|
||||||
|
|
||||||
|
constitution:
|
||||||
|
name: constitution
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
description: the ID of constitution
|
||||||
|
example: e74be8e4-6823-47c4-bd1b-789725b2fa8e
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
JWTAuth:
|
JWTAuth:
|
||||||
type: http
|
type: http
|
||||||
|
|||||||
Reference in New Issue
Block a user