rename judgment to ballot

pull/13/head
Nathanaël Jourdane 4 years ago committed by guhur
parent 3829ce420c
commit 89ccb97df9

@ -2,7 +2,7 @@
openapi: 3.0.0
info:
title: Mieux Voter
description: A poll application based on Majority Judgment (MJ).
description: A poll application based on Majority Judgment.
version: 1.0.1-oas3
termsOfService: 'https://github.com/MieuxVoter'
contact:
@ -54,8 +54,8 @@ paths:
$ref: '#/components/links/update-poll'
delete-poll:
$ref: '#/components/links/delete-poll'
create-judgment:
$ref: '#/components/links/create-judgment'
create-ballot:
$ref: '#/components/links/create-ballot'
list-poll-results:
$ref: '#/components/links/list-poll-results'
'400':
@ -111,7 +111,7 @@ paths:
$ref: '#/components/responses/poll-not-found'
security:
- pollAuth: []
'/polls/{poll-id}/judgments':
'/polls/{poll-id}/ballots':
parameters:
- in: path
name: poll-id
@ -119,14 +119,14 @@ paths:
schema:
type: string
post:
operationId: create-judgment
summary: Creates a judgment
operationId: create-ballot
summary: Creates a ballot
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/judgment'
$ref: '#/components/schemas/ballot'
security:
- {}
- judgeAuth: []
@ -140,13 +140,13 @@ paths:
properties:
id:
type: string
description: Id of the created judgment.
description: Id of the created ballot.
links:
get-judgment:
$ref: '#/components/links/get-judgment'
delete-judgment:
$ref: '#/components/links/delete-judgment'
'/polls/{poll-id}/judgments/{judgment-id}':
get-ballot:
$ref: '#/components/links/get-ballot'
delete-ballot:
$ref: '#/components/links/delete-ballot'
'/polls/{poll-id}/ballots/{ballot-id}':
parameters:
- in: path
name: poll-id
@ -154,28 +154,28 @@ paths:
schema:
type: string
- in: path
name: judgment-id
name: ballot-id
required: true
schema:
type: string
get:
operationId: get-judgment
summary: Gets a judgment by ID
operationId: get-ballot
summary: Gets a ballot by ID
responses:
'200':
description: A judgment object
description: A ballot object
content:
application/json:
schema:
$ref: '#/components/schemas/judgment'
$ref: '#/components/schemas/ballot'
delete:
operationId: delete-judgment
summary: Deletes a judgment
operationId: delete-ballot
summary: Deletes a ballot
responses:
'200':
description: OK
'404':
$ref: '#/components/responses/judgment-not-found'
$ref: '#/components/responses/ballot-not-found'
security:
- judgeAuth: []
'/polls/{poll-id}/judges':
@ -265,7 +265,7 @@ components:
type: http
scheme: bearer
schemas:
judgment:
ballot:
type: object
properties:
id:
@ -291,11 +291,11 @@ components:
type: string
description: Unique but short name of the candidate.
example: A new school
judgments:
ballots:
type: array
description: The judgments received by this candidate.
description: The ballots received by this candidate.
items:
$ref: '#/components/schemas/judgment'
$ref: '#/components/schemas/ballot'
grade:
type: object
properties:
@ -423,13 +423,13 @@ components:
description: >
The `id` value returned in the response can be used as the `poll-id`
parameter in DELETE /polls/{poll-id}.
create-judgment:
operationId: create-judgment
create-ballot:
operationId: create-ballot
parameters:
userId: $response.body#/id
description: >
The `id` value returned in the response can be used as the `poll-id`
parameter in POST /polls/{poll-id}/judgments.
parameter in POST /polls/{poll-id}/ballots.
list-poll-results:
operationId: list-poll-results
parameters:
@ -437,20 +437,20 @@ components:
description: >
The `id` value returned in the response can be used as the `poll-id`
parameter in GET /polls/{poll-id}/results.
get-judgment:
operationId: get-judgment
get-ballot:
operationId: get-ballot
parameters:
judgmentId: $response.body#/id
ballotId: $response.body#/id
description: >
The `id` value returned in the response can be used as the `judgment-id`
parameter in GET /polls/{poll-id}/judgments/{judgment-id}.
delete-judgment:
operationId: delete-judgment
The `id` value returned in the response can be used as the `ballot-id`
parameter in GET /polls/{poll-id}/ballots/{ballot-id}.
delete-ballot:
operationId: delete-ballot
parameters:
judgmentId: $response.body#/id
ballotId: $response.body#/id
description: >
The `id` value returned in the response can be used as the `judgment-id`
parameter in DELETE /polls/{poll-id}/judgments/{judgment-id}.
The `id` value returned in the response can be used as the `ballot-id`
parameter in DELETE /polls/{poll-id}/ballots/{ballot-id}.
responses:
poll-not-found:
description: The specified poll was not found
@ -458,8 +458,8 @@ components:
application/json:
schema:
$ref: '#/components/schemas/error'
judgment-not-found:
description: The specified judgment was not found
ballot-not-found:
description: The specified ballot was not found
content:
application/json:
schema:

@ -1,6 +1,6 @@
operationId: 'create-judgment'
operationId: 'create-ballot'
parameters:
userId: $response.body#/id
description: >
The `id` value returned in the response can be used as the `poll-id` parameter
in POST /polls/{poll-id}/judgments.
in POST /polls/{poll-id}/ballots.

@ -0,0 +1,6 @@
operationId: 'delete-ballot'
parameters:
ballotId: $response.body#/id
description: >
The `id` value returned in the response can be used as the `ballot-id`
parameter in DELETE /polls/{poll-id}/ballots/{ballot-id}.

@ -1,6 +0,0 @@
operationId: 'delete-judgment'
parameters:
judgmentId: $response.body#/id
description: >
The `id` value returned in the response can be used as the `judgment-id`
parameter in DELETE /polls/{poll-id}/judgments/{judgment-id}.

@ -0,0 +1,6 @@
operationId: 'get-ballot'
parameters:
ballotId: $response.body#/id
description: >
The `id` value returned in the response can be used as the `ballot-id`
parameter in GET /polls/{poll-id}/ballots/{ballot-id}.

@ -1,6 +0,0 @@
operationId: 'get-judgment'
parameters:
judgmentId: $response.body#/id
description: >
The `id` value returned in the response can be used as the `judgment-id`
parameter in GET /polls/{poll-id}/judgments/{judgment-id}.

@ -1,4 +1,4 @@
description: The specified judgment was not found
description: The specified ballot was not found
content:
application/json:
schema:

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

@ -1,7 +1,7 @@
openapi: 3.0.0
info:
title: Mieux Voter
description: A poll application based on Majority Judgment (MJ).
description: A poll application based on Majority Judgment.
version: 1.0.1-oas3
termsOfService: 'https://github.com/MieuxVoter'
contact:
@ -17,10 +17,10 @@ paths:
$ref: paths/polls.yaml
'/polls/{poll-id}':
$ref: 'paths/polls@{poll-id}.yaml'
'/polls/{poll-id}/judgments':
$ref: 'paths/polls@{poll-id}@judgments.yaml'
'/polls/{poll-id}/judgments/{judgment-id}':
$ref: 'paths/polls@{poll-id}@judgments@{judgment-id}.yaml'
'/polls/{poll-id}/ballots':
$ref: 'paths/polls@{poll-id}@ballots.yaml'
'/polls/{poll-id}/ballots/{ballot-id}':
$ref: 'paths/polls@{poll-id}@ballots@{ballot-id}.yaml'
'/polls/{poll-id}/judges':
$ref: 'paths/polls@{poll-id}@judges.yaml'
'/polls/{poll-id}/judges/{judge-id}/':

@ -37,8 +37,8 @@ post:
$ref: ../components/links/update-poll.yaml
delete-poll:
$ref: ../components/links/delete-poll.yaml
create-judgment:
$ref: ../components/links/create-judgment.yaml
create-ballot:
$ref: ../components/links/create-ballot.yaml
list-poll-results:
$ref: ../components/links/list-poll-results.yaml
'400':

@ -5,14 +5,14 @@ parameters:
schema:
type: string
post:
operationId: create-judgment
summary: Creates a judgment
operationId: create-ballot
summary: Creates a ballot
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas/judgment.yaml
$ref: ../components/schemas/ballot.yaml
security:
- {}
- judgeAuth: []
@ -26,9 +26,9 @@ post:
properties:
id:
type: string
description: Id of the created judgment.
description: Id of the created ballot.
links:
get-judgment:
$ref: ../components/links/get-judgment.yaml
delete-judgment:
$ref: ../components/links/delete-judgment.yaml
get-ballot:
$ref: ../components/links/get-ballot.yaml
delete-ballot:
$ref: ../components/links/delete-ballot.yaml

@ -5,27 +5,27 @@ parameters:
schema:
type: string
- in: path
name: judgment-id
name: ballot-id
required: true
schema:
type: string
get:
operationId: get-judgment
summary: Gets a judgment by ID
operationId: get-ballot
summary: Gets a ballot by ID
responses:
'200':
description: A judgment object
description: A ballot object
content:
application/json:
schema:
$ref: ../components/schemas/judgment.yaml
$ref: ../components/schemas/ballot.yaml
delete:
operationId: delete-judgment
summary: Deletes a judgment
operationId: delete-ballot
summary: Deletes a ballot
responses:
'200':
description: OK
'404':
$ref: ../components/responses/judgment-not-found.yaml
$ref: ../components/responses/ballot-not-found.yaml
security:
- judgeAuth: []
Loading…
Cancel
Save