Change GET and POST `/users` object schema
@@ -16,6 +16,14 @@ paths:
responses:
200:
description: {{RESPONSES['users']['get']['success']}}
+ schema:
+ type: array
+ items:
+ type: object
+ example:
+ id: 1
+ username: foobar
+ createdAt: 2019-10-18T10:00:00.00Z
401:
description: {{RESPONSES['general']['unauthorized']}}
403:
@@ -49,7 +57,7 @@ paths:
user:
type: array
items:
- $ref: '#/definitions/User'
+ $ref: '#/definitions/UserToDisplay'
400:
description: {{RESPONSES['general']['bad_request']}}
401:
@@ -355,27 +363,19 @@ paths:
security:
- Bearer: []
definitions:
- User:
+ UserToDisplay:
type: object
- required:
- - username
- - password
properties:
id:
type: integer
format: int64
example: 1
- readOnly: true
username:
type: string
example: foobar
- password:
- type: string
- example: difficult_password
createdAt:
type: string
format: date-time
- readOnly: true
UserForm:
type: object
required:
