From 5d58bc6bf26b6674917b79be775e2daf0a2be01b Mon Sep 17 00:00:00 2001 From: domi41 Date: Sun, 6 Sep 2020 05:30:02 +0200 Subject: [PATCH] refactor: grade --> grade (1/2) Rationale: `grade` comes from a frencophone bias. --- openapi/components/schemas/ballot.yaml | 7 +++++-- openapi/components/schemas/mention.yaml | 13 ++++++++----- openapi/components/schemas/poll.yaml | 12 ++++++------ openapi/components/schemas/result.yaml | 4 ++-- 4 files changed, 21 insertions(+), 15 deletions(-) diff --git a/openapi/components/schemas/ballot.yaml b/openapi/components/schemas/ballot.yaml index efb0644..a17de99 100644 --- a/openapi/components/schemas/ballot.yaml +++ b/openapi/components/schemas/ballot.yaml @@ -5,7 +5,10 @@ properties: description: A unique identifier example: 4 readOnly: true - mention: + grade: type: integer - description: The mention item, according to the mentions array defined when creating the poll. + description: > + One grade of the grading defined when creating the poll. + Zero (0) means the worst grade, and it goes upwards from there, + up to the size of the grading, minus one. example: 2 diff --git a/openapi/components/schemas/mention.yaml b/openapi/components/schemas/mention.yaml index dc84d6c..fe39a24 100644 --- a/openapi/components/schemas/mention.yaml +++ b/openapi/components/schemas/mention.yaml @@ -2,16 +2,19 @@ type: object properties: id: type: integer - description: A unique identifier + description: > + Unique identifier of the grade in its grading. + Zero (0) is the worst grade, and it goes upwards. example: 0 readOnly: true name: type: string - description: Unique but short name of the mention, like *Excellent* or *To reject*. - example: Excellent + description: > + Unique but short name of the grade, like "Excellent" or "To reject". + example: Good description: type: string - description: An optional description of the mention - example: In this poll, the mention *To reject* disqualifies the proposal. + description: An optional description of the grade. + example: In this poll, the grade "To reject" disqualifies the proposal. required: - name diff --git a/openapi/components/schemas/poll.yaml b/openapi/components/schemas/poll.yaml index 3f20575..0684620 100644 --- a/openapi/components/schemas/poll.yaml +++ b/openapi/components/schemas/poll.yaml @@ -2,7 +2,7 @@ type: object properties: id: type: string - description: A unique identifier + description: A unique identifier. example: 1jDe1e5eF_IkaYPuoIYX readOnly: true title: @@ -12,7 +12,7 @@ properties: description: type: string description: A description of the poll - example: + example: proposals: type: array description: The proposals being voted in a poll. @@ -20,13 +20,13 @@ properties: maxItems: 20 items: $ref: ./proposal.yaml - mentions: + grades: type: array - description: The mentions on which one participant vote to a proposal. + description: The grades on which one participant vote to a proposal. minItems: 2 maxItems: 10 items: - $ref: ./mention.yaml + $ref: ./grade.yaml participants: type: array description: The participants that are allowed to participate to the election. @@ -37,7 +37,7 @@ properties: description: Organizer id. If not given, a dummy user is created. restrict-participants: type: boolean - description: True if anyone can participate to this poll, False otherwise. + description: True if anyone can participate in this poll, False otherwise. example: false required: - title diff --git a/openapi/components/schemas/result.yaml b/openapi/components/schemas/result.yaml index 8f9f873..c2b6bd3 100644 --- a/openapi/components/schemas/result.yaml +++ b/openapi/components/schemas/result.yaml @@ -4,8 +4,8 @@ properties: $ref: ./poll.yaml ranking: type: array - description: An array representing mentions level for each proposal, - according to the mentions list, following the order of the proposals array + description: An array representing grades level for each proposal, + according to the grades list, following the order of the proposals array defined when the related poll has been created. example: [0, 6, 3, 2, 2] minItems: 2