Browse Source

rename candidate to proposal

pull/13/head
Nathanaël Jourdane 2 years ago
committed by guhur
parent
commit
b6f2831c14
  1. 20
      mv-openapi.yaml
  2. 8
      openapi/components/schemas/poll.yaml
  3. 4
      openapi/components/schemas/proposal.yaml
  4. 4
      openapi/components/schemas/result.yaml
  5. 2
      openapi/paths/polls.yaml

20
mv-openapi.yaml

@ -59,7 +59,7 @@ paths:
list-poll-results:
$ref: '#/components/links/list-poll-results'
'400':
description: Bad Request. Expect at least 2 candidates and a title.
description: Bad Request. Expect at least 2 proposals and a title.
'/polls/{poll-id}':
parameters:
- in: path
@ -279,7 +279,7 @@ components:
The mention item, according to the mentions array defined when
creating the poll.
example: 2
candidate:
proposal:
type: object
properties:
id:
@ -289,11 +289,11 @@ components:
example: 4
name:
type: string
description: Unique but short name of the candidate.
description: Unique but short name of the proposal.
example: A new school
ballots:
type: array
description: The ballots received by this candidate.
description: The ballots received by this proposal.
items:
$ref: '#/components/schemas/ballot'
mention:
@ -346,16 +346,16 @@ components:
type: string
example: What project should our neighbourhood invest in for the next year?
description: The title of the poll
candidates:
proposals:
type: array
description: The candidates being voted in a poll.
description: The proposals being voted in a poll.
minItems: 2
maxItems: 20
items:
$ref: '#/components/schemas/candidate'
$ref: '#/components/schemas/proposal'
mentions:
type: array
description: The mentions on which one vote to a candidate.
description: The mentions on which one participant vote to a proposal.
minItems: 2
maxItems: 10
items:
@ -391,8 +391,8 @@ components:
ranking:
type: array
description: >-
An array representing mentions level for each candidate, according
to the mentions list, following the order of the candidates array
An array representing mentions level for each proposal, according to
the mentions list, following the order of the proposals array
defined when the related poll has been created.
example:
- 0

8
openapi/components/schemas/poll.yaml

@ -9,16 +9,16 @@ properties:
type: string
example: 'What project should our neighbourhood invest in for the next year?'
description: 'The title of the poll'
candidates:
proposals:
type: array
description: The candidates being voted in a poll.
description: The proposals being voted in a poll.
minItems: 2
maxItems: 20
items:
$ref: ./candidate.yaml
$ref: ./proposal.yaml
mentions:
type: array
description: The mentions on which one participant vote to a candidate.
description: The mentions on which one participant vote to a proposal.
minItems: 2
maxItems: 10
items:

4
openapi/components/schemas/candidate.yaml → openapi/components/schemas/proposal.yaml

@ -7,10 +7,10 @@ properties:
example: 4
name:
type: string
description: Unique but short name of the candidate.
description: Unique but short name of the proposal.
example: A new school
ballots:
type: array
description: The ballots received by this candidate.
description: The ballots received by this proposal.
items:
$ref: ./ballot.yaml

4
openapi/components/schemas/result.yaml

@ -4,8 +4,8 @@ properties:
$ref: ./poll.yaml
ranking:
type: array
description: An array representing mentions level for each candidate,
according to the mentions list, following the order of the candidates array
description: An array representing mentions level for each proposal,
according to the mentions list, following the order of the proposals array
defined when the related poll has been created.
example: [0, 6, 3, 2, 2]
minItems: 2

2
openapi/paths/polls.yaml

@ -42,4 +42,4 @@ post:
list-poll-results:
$ref: ../components/links/list-poll-results.yaml
'400':
description: Bad Request. Expect at least 2 candidates and a title.
description: Bad Request. Expect at least 2 proposals and a title.
Loading…
Cancel
Save