fix(schemas): add required

guhur-user
Pierre-Louis Guhur 4 years ago
parent fd05f58f6c
commit 85217a9c78

@ -394,6 +394,8 @@ components:
type: string type: string
description: An optional description of the proposal description: An optional description of the proposal
example: This school would welcome 500 pupils. example: This school would welcome 500 pupils.
required:
- name
mention: mention:
type: object type: object
properties: properties:
@ -412,34 +414,42 @@ components:
type: string type: string
description: An optional description of the mention description: An optional description of the mention
example: 'In this poll, the mention *To reject* disqualifies the proposal.' example: 'In this poll, the mention *To reject* disqualifies the proposal.'
required:
- name
participant: participant:
type: object type: object
properties: properties:
id: id:
type: string type: string
description: A unique identifier description: A unique identifier.
example: JtRm05yjMAuFCI2uwnFp example: JtRm05yjMAuFCI2uwnFp
readOnly: true readOnly: true
description: description:
type: string type: string
description: An optional description of the participant description: An optional description of the participant.
example: John Doe example: John Doe
has-participed: has-participed:
type: boolean type: boolean
description: >- description: >-
True if the participant already participed to the poll, False True if the participant already participed to the poll, False
otherwise otherwise.
example: true example: true
poll-id: poll-id:
type: string type: string
description: The identifier of the poll that the participant participates on. description: The identifier of the poll that the participant participates on.
example: 1jDe1e5eF_IkaYPuoIYX example: 1jDe1e5eF_IkaYPuoIYX
user-id:
type: string
description: The identifier of the user.
example: 1jDe1e5eF_IkaYPuoIYX
mail: mail:
type: string type: string
description: >- description: >-
The mail that will eventually created at the creation of the The mail that will eventually created at the creation of the
participant (not kept in memory). participant (not kept in memory).
example: john-doe@example.com example: john-doe@example.com
required:
- poll-id
poll: poll:
type: object type: object
properties: properties:
@ -482,6 +492,9 @@ components:
type: boolean type: boolean
description: 'True if anyone can participate to this poll, False otherwise.' description: 'True if anyone can participate to this poll, False otherwise.'
example: false example: false
required:
- title
- proposals
error: error:
type: object type: object
properties: properties:
@ -518,6 +531,9 @@ components:
items: items:
type: integer type: integer
format: int16 format: int16
required:
- ranking
- poll
user: user:
type: object type: object
properties: properties:

@ -13,3 +13,5 @@ properties:
type: string type: string
description: An optional description of the mention description: An optional description of the mention
example: In this poll, the mention *To reject* disqualifies the proposal. example: In this poll, the mention *To reject* disqualifies the proposal.
required:
- name

@ -2,22 +2,28 @@ type: object
properties: properties:
id: id:
type: string type: string
description: A unique identifier description: A unique identifier.
example: JtRm05yjMAuFCI2uwnFp example: JtRm05yjMAuFCI2uwnFp
readOnly: true readOnly: true
description: description:
type: string type: string
description: An optional description of the participant description: An optional description of the participant.
example: John Doe example: John Doe
has-participed: has-participed:
type: boolean type: boolean
description: True if the participant already participed to the poll, False otherwise description: True if the participant already participed to the poll, False otherwise.
example: true example: true
poll-id: poll-id:
type: string type: string
description: The identifier of the poll that the participant participates on. description: The identifier of the poll that the participant participates on.
example: 1jDe1e5eF_IkaYPuoIYX example: 1jDe1e5eF_IkaYPuoIYX
user-id:
type: string
description: The identifier of the user.
example: 1jDe1e5eF_IkaYPuoIYX
mail: mail:
type: string type: string
description: The mail that will eventually created at the creation of the participant (not kept in memory). description: The mail that will eventually created at the creation of the participant (not kept in memory).
example: john-doe@example.com example: john-doe@example.com
required:
- poll-id

@ -39,3 +39,6 @@ properties:
type: boolean type: boolean
description: True if anyone can participate to this poll, False otherwise. description: True if anyone can participate to this poll, False otherwise.
example: false example: false
required:
- title
- proposals

@ -18,3 +18,5 @@ properties:
type: string type: string
description: An optional description of the proposal description: An optional description of the proposal
example: This school would welcome 500 pupils. example: This school would welcome 500 pupils.
required:
- name

@ -13,3 +13,6 @@ properties:
items: items:
type: integer type: integer
format: int16 format: int16
required:
- ranking
- poll

Loading…
Cancel
Save