Browse Source
Merge pull request #14 from MieuxVoter/guhur-user
Merge pull request #14 from MieuxVoter/guhur-user
feat(user): create user schemamaster
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 339 additions and 12 deletions
-
186mv-openapi.yaml
-
6openapi/components/links/delete-user.yaml
-
6openapi/components/links/get-user.yaml
-
6openapi/components/links/update-user.yaml
-
5openapi/components/responses/user-not-found.yaml
-
6openapi/components/schemas/mention.yaml
-
12openapi/components/schemas/participant.yaml
-
8openapi/components/schemas/poll.yaml
-
2openapi/components/schemas/proposal.yaml
-
3openapi/components/schemas/result.yaml
-
15openapi/components/schemas/user.yaml
-
7openapi/mv-openapi-root.yaml
-
39openapi/paths/users.yaml
-
50openapi/paths/users@{user-id}.yaml
@ -0,0 +1,6 @@ |
|||
operationId: 'delete-user' |
|||
parameters: |
|||
userId: $response.body#/id |
|||
description: > |
|||
The `id` value returned in the response can be used as the `user-id` parameter |
|||
in DELETE /users/{user-id}. |
@ -0,0 +1,6 @@ |
|||
operationId: 'get-user' |
|||
parameters: |
|||
userId: $response.body#/id |
|||
description: > |
|||
The `id` value returned in the response can be used as the `user-id` parameter |
|||
in GET /users/{user-id}. |
@ -0,0 +1,6 @@ |
|||
operationId: 'update-user' |
|||
parameters: |
|||
userId: $response.body#/id |
|||
description: > |
|||
The `id` value returned in the response can be used as the `user-id` parameter |
|||
in PATCH /users/{user-id}. |
@ -0,0 +1,5 @@ |
|||
description: The specified user was not found |
|||
content: |
|||
application/json: |
|||
schema: |
|||
$ref: ../schemas/error.yaml |
@ -0,0 +1,15 @@ |
|||
type: object |
|||
properties: |
|||
id: |
|||
type: integer |
|||
description: A unique identifier |
|||
example: 0 |
|||
readOnly: true |
|||
name: |
|||
type: string |
|||
description: Unique user-name |
|||
example: john.doe |
|||
description: |
|||
type: string |
|||
description: An optional description of the user |
|||
example: John Doe is a multiple-use name that is used when the true name of a person is unknown or is being intentionally concealed |
@ -0,0 +1,39 @@ |
|||
get: |
|||
operationId: get-users |
|||
summary: Gets all users. |
|||
responses: |
|||
'200': |
|||
description: OK |
|||
content: |
|||
application/json: |
|||
schema: |
|||
type: array |
|||
items: |
|||
$ref: ../components/schemas/user.yaml |
|||
post: |
|||
operationId: create-user |
|||
summary: Creates an user |
|||
requestBody: |
|||
required: true |
|||
content: |
|||
application/json: |
|||
schema: |
|||
$ref: ../components/schemas/user.yaml |
|||
responses: |
|||
'201': |
|||
description: Created |
|||
content: |
|||
application/json: |
|||
schema: |
|||
type: object |
|||
properties: |
|||
id: |
|||
type: string |
|||
description: Id of the created user. |
|||
links: |
|||
get-user: |
|||
$ref: ../components/links/get-user.yaml |
|||
update-user: |
|||
$ref: ../components/links/update-user.yaml |
|||
delete-user: |
|||
$ref: ../components/links/delete-user.yaml |
@ -0,0 +1,50 @@ |
|||
parameters: |
|||
- in: path |
|||
name: user-id |
|||
required: true |
|||
schema: |
|||
type: integer |
|||
format: int64 |
|||
get: |
|||
operationId: get-user |
|||
summary: Gets a user by ID |
|||
responses: |
|||
'200': |
|||
description: OK |
|||
content: |
|||
application/json: |
|||
schema: |
|||
$ref: ../components/schemas/user.yaml |
|||
'404': |
|||
$ref: ../components/responses/user-not-found.yaml |
|||
patch: |
|||
operationId: update-user |
|||
summary: Updates a user |
|||
requestBody: |
|||
required: true |
|||
content: |
|||
application/json: |
|||
schema: |
|||
$ref: ../components/schemas/user.yaml |
|||
security: |
|||
- {} |
|||
- userAuth: [] |
|||
responses: |
|||
'200': |
|||
description: OK |
|||
content: |
|||
application/json: |
|||
schema: |
|||
type: array |
|||
items: |
|||
$ref: ../components/schemas/user.yaml |
|||
delete: |
|||
operationId: delete-user |
|||
summary: Deletes a user |
|||
responses: |
|||
'200': |
|||
description: OK |
|||
'404': |
|||
$ref: ../components/responses/user-not-found.yaml |
|||
security: |
|||
- userAuth: [] |
Write
Preview
Loading…
Cancel
Save
Reference in new issue