rename candidate to proposal

pull/13/head
Nathanaël Jourdane 4 years ago committed by guhur
parent e84ddc5d82
commit b6f2831c14

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

@ -9,16 +9,16 @@ properties:
type: string type: string
example: 'What project should our neighbourhood invest in for the next year?' example: 'What project should our neighbourhood invest in for the next year?'
description: 'The title of the poll' description: 'The title of the poll'
candidates: proposals:
type: array type: array
description: The candidates being voted in a poll. description: The proposals being voted in a poll.
minItems: 2 minItems: 2
maxItems: 20 maxItems: 20
items: items:
$ref: ./candidate.yaml $ref: ./proposal.yaml
mentions: mentions:
type: array 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 minItems: 2
maxItems: 10 maxItems: 10
items: items:

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

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

@ -42,4 +42,4 @@ post:
list-poll-results: list-poll-results:
$ref: ../components/links/list-poll-results.yaml $ref: ../components/links/list-poll-results.yaml
'400': '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