You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mv-api-spec/openapi/paths/polls.yaml

44 lines
1.1 KiB

get:
summary: Gets all polls.
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: ../components/schemas/Poll.yaml
post:
summary: Creates a poll.
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas/Poll.yaml
responses:
'201':
description: Created
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: Id of the created poll.
links:
GetPollByPollId:
$ref: ../components/links/GetPollByPollId.yaml
SetPollByPollId:
$ref: ../components/links/SetPollByPollId.yaml
DelPollByPollId:
$ref: ../components/links/DelPollByPollId.yaml
JudgeByPollId:
$ref: ../components/links/JudgeByPollId.yaml
ResultsByPollId:
$ref: ../components/links/ResultsByPollId.yaml
'400':
description: Bad Request. Expect at least 2 candidates and a title.