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

53 lines
1.4 KiB

get:
operationId: get-polls
summary: Gets all polls
description: |
Gets all polls that were marked as publicly accessible.
Polls only accessible by invitation or link will not be returned.
tags:
- Poll Indexation
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: ../components/schemas/poll.yaml
post:
operationId: create-poll
summary: Creates a poll
tags:
- Poll Organization
requestBody:
required: true
content:
application/json:
schema:
$ref: ../components/schemas/poll-new.yaml
responses:
'201':
description: Created
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: Id of the created poll.
links:
get-poll:
$ref: ../components/links/get-poll.yaml
update-poll:
$ref: ../components/links/update-poll.yaml
delete-poll:
$ref: ../components/links/delete-poll.yaml
create-ballot:
$ref: ../components/links/create-ballot.yaml
list-poll-results:
$ref: ../components/links/list-poll-results.yaml
'400':
description: Bad Request. Provide at least 2 proposals and a title.