Implement getElectionResults
This commit is contained in:
@ -124,6 +124,12 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ElectionResultsResponse"
|
||||
400:
|
||||
description: Request malformed
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
404:
|
||||
description: Election doesn't exist
|
||||
content:
|
||||
@ -205,6 +211,22 @@ components:
|
||||
|
||||
ElectionResultsResponse:
|
||||
type: object
|
||||
properties:
|
||||
results:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/VotesForChoice"
|
||||
|
||||
VotesForChoice:
|
||||
type: object
|
||||
required:
|
||||
- choice
|
||||
- votes
|
||||
properties:
|
||||
choice:
|
||||
type: string
|
||||
votes:
|
||||
type: integer
|
||||
|
||||
ErrorResponse:
|
||||
type: object
|
||||
|
Reference in New Issue
Block a user