Browse Source

fix(schemas): add required

guhur-user
Pierre-Louis Guhur 2 years ago
parent
commit
85217a9c78
  1. 22
      mv-openapi.yaml
  2. 2
      openapi/components/schemas/mention.yaml
  3. 12
      openapi/components/schemas/participant.yaml
  4. 3
      openapi/components/schemas/poll.yaml
  5. 2
      openapi/components/schemas/proposal.yaml
  6. 3
      openapi/components/schemas/result.yaml

22
mv-openapi.yaml

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

2
openapi/components/schemas/mention.yaml

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

12
openapi/components/schemas/participant.yaml

@ -2,22 +2,28 @@ type: object
properties:
id:
type: string
description: A unique identifier
description: A unique identifier.
example: JtRm05yjMAuFCI2uwnFp
readOnly: true
description:
type: string
description: An optional description of the participant
description: An optional description of the participant.
example: John Doe
has-participed:
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
poll-id:
type: string
description: The identifier of the poll that the participant participates on.
example: 1jDe1e5eF_IkaYPuoIYX
user-id:
type: string
description: The identifier of the user.
example: 1jDe1e5eF_IkaYPuoIYX
mail:
type: string
description: The mail that will eventually created at the creation of the participant (not kept in memory).
example: john-doe@example.com
required:
- poll-id

3
openapi/components/schemas/poll.yaml

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

2
openapi/components/schemas/proposal.yaml

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

3
openapi/components/schemas/result.yaml

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