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

@ -1,6 +1,6 @@
operationId: 'create-judgment' operationId: 'create-ballot'
parameters: parameters:
userId: $response.body#/id userId: $response.body#/id
description: > description: >
The `id` value returned in the response can be used as the `poll-id` parameter 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: content:
application/json: application/json:
schema: schema:

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

@ -1,7 +1,7 @@
openapi: 3.0.0 openapi: 3.0.0
info: info:
title: Mieux Voter 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 version: 1.0.1-oas3
termsOfService: 'https://github.com/MieuxVoter' termsOfService: 'https://github.com/MieuxVoter'
contact: contact:
@ -17,10 +17,10 @@ paths:
$ref: paths/polls.yaml $ref: paths/polls.yaml
'/polls/{poll-id}': '/polls/{poll-id}':
$ref: 'paths/polls@{poll-id}.yaml' $ref: 'paths/polls@{poll-id}.yaml'
'/polls/{poll-id}/judgments': '/polls/{poll-id}/ballots':
$ref: 'paths/polls@{poll-id}@judgments.yaml' $ref: 'paths/polls@{poll-id}@ballots.yaml'
'/polls/{poll-id}/judgments/{judgment-id}': '/polls/{poll-id}/ballots/{ballot-id}':
$ref: 'paths/polls@{poll-id}@judgments@{judgment-id}.yaml' $ref: 'paths/polls@{poll-id}@ballots@{ballot-id}.yaml'
'/polls/{poll-id}/judges': '/polls/{poll-id}/judges':
$ref: 'paths/polls@{poll-id}@judges.yaml' $ref: 'paths/polls@{poll-id}@judges.yaml'
'/polls/{poll-id}/judges/{judge-id}/': '/polls/{poll-id}/judges/{judge-id}/':

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

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

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