Test openapi schema of /citizens

This commit is contained in:
2021-03-16 18:23:40 +01:00
parent c07a57a591
commit 1655f47044
4 changed files with 73 additions and 3 deletions

View File

@@ -362,6 +362,62 @@ paths:
404:
description: no user with this email
/citizens:
get:
security:
- JWTAuth: []
summary: Get all citizens
tags:
- citizen
operationId: getCitizens
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/sort'
- $ref: '#/components/parameters/direction'
- $ref: '#/components/parameters/search'
responses:
200:
description: The Citizen objects
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Paginated'
- type: object
properties:
result:
type: array
items:
type: object
required:
- id
- name
- email
properties:
id:
$ref: '#/components/schemas/UUID'
name:
type: object
required:
- firstName
- lastName
properties:
firstName:
type: string
example:
john
lastName:
type: string
example:
Doe
email:
type: string
format: email
example: my.email@dc-project.fr
401:
$ref: '#/components/responses/401'
components:
parameters:
page: