rename candidate to proposal

pull/9/head
Nathanaël Jourdane 4 years ago
parent 90e4f4e435
commit 865805fdb6

@ -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

@ -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:

@ -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,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

@ -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