diff --git a/src/main/resources/openApi.yaml b/src/main/resources/openApi.yaml index e26b703..9894512 100644 --- a/src/main/resources/openApi.yaml +++ b/src/main/resources/openApi.yaml @@ -84,9 +84,14 @@ paths: content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/CitizenResponse' + allOf: + - $ref: '#/components/schemas/Paginated' + - type: object + properties: + result: + type: array + items: + $ref: '#/components/schemas/CitizenResponse' /articles: get: @@ -106,9 +111,14 @@ paths: content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/ArticleResponse' + allOf: + - $ref: '#/components/schemas/Paginated' + - type: object + properties: + result: + type: array + items: + $ref: '#/components/schemas/ArticleResponse' post: security: - JWTAuth: [] @@ -171,9 +181,14 @@ paths: content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/ConstitutionResponse' + allOf: + - $ref: '#/components/schemas/Paginated' + - type: object + properties: + result: + type: array + items: + $ref: '#/components/schemas/ConstitutionResponse' post: security: - JWTAuth: [] @@ -519,6 +534,33 @@ components: version_id: $ref: '#/components/schemas/UUID' + Paginated: + properties: + result: + type: array + items: + $ref: '#/components/schemas/UuidEntity' + count: + type: integer + minimum: 0 + example: 1 + currentPage: + type: integer + minimum: 0 + example: 1 + limit: + type: integer + minimum: 0 + example: 50 + offset: + type: integer + minimum: 0 + example: 1 + total: + type: integer + minimum: 0 + example: 1 + UserBase: properties: username: