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@{poll-id}.yaml

62 lines
1.4 KiB

parameters:
- in: path
name: poll-id
required: true
schema:
type: integer
format: int64
get:
operationId: get-poll
summary: Gets a poll by ID
tags:
- Poll Organization
- Poll Participation
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/poll.yaml
'404':
$ref: ../components/responses/poll-not-found.yaml
patch:
operationId: update-poll
summary: Updates a poll
tags:
- Poll Organization
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas/poll.yaml
security:
- {}
- pollAuth: []
responses:
'200':
description: Poll was updated.
content:
application/json:
schema:
$ref: ../components/schemas/poll.yaml
'404':
$ref: ../components/responses/poll-not-found.yaml
delete:
operationId: delete-poll
summary: Deletes a poll
description: >
All the Poll data will be permanently erased.
This includes all the corollary models (Tally, Ballots, …)
Only the Poll's author may delete it. (and wild admins)
tags:
- Poll Organization
responses:
'200':
description: Poll was deleted.
'404':
$ref: ../components/responses/poll-not-found.yaml
security:
- pollAuth: []