Skip to content

Commit

Permalink
add tags to api endpoints (#192)
Browse files Browse the repository at this point in the history
Closes #150

---------

Co-authored-by: Carson McManus <[email protected]>
  • Loading branch information
invissy and dyc3 authored May 2, 2023
1 parent d27fc09 commit 66a38f0
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion docs/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ paths:
/api/user/register:
summary: Register a new user
post:
tags:
- user
requestBody:
content:
application/json:
Expand All @@ -36,6 +38,8 @@ paths:
/api/user/login:
summary: Log in an existing user
post:
tags:
- user
requestBody:
content:
application/json:
Expand All @@ -56,6 +60,8 @@ paths:
"/api/survey/create":
post:
summary: Create a new survey
tags:
- survey
security:
- JWT: []
responses:
Expand Down Expand Up @@ -92,6 +98,8 @@ paths:
- $ref: "#/components/parameters/survey"
get:
summary: Get a survey.
tags:
- survey
description: >
Get a survey. If the survey is not published, only the owner can
get it. If the survey is published, anyone can get it.
Expand Down Expand Up @@ -136,6 +144,8 @@ paths:
description: Survey not found
patch:
summary: Update a survey
tags:
- survey
description: >
Update a survey. Only the owner of the survey can update it. If the
survey is published, it cannot be updated unless it is unpublished
Expand Down Expand Up @@ -181,6 +191,9 @@ paths:
/api/user/surveys:
summary: Get all surveys owned by the user
get:
tags:
- survey
- user
security:
- JWT: []
responses:
Expand All @@ -204,6 +217,8 @@ paths:
format: uuid
post:
summary: Submit a survey response
tags:
- survey response
description: >
Submit a survey response. The request body is a JSON object with
the question IDs as keys and the response as the value.
Expand All @@ -224,6 +239,8 @@ paths:
$ref: "#/components/requestBodies/SurveyResponse"
patch:
summary: Update a survey response
tags:
- survey response
description: >
Update a survey response. The request body is a JSON object with
the question IDs as keys and the response as the value.
Expand All @@ -239,6 +256,8 @@ paths:
$ref: "#/components/requestBodies/SurveyResponse"
get:
summary: Get a survey response
tags:
- survey reponse
parameters:
- $ref: "#/components/parameters/ifmodifiedsince"
- $ref: "#/components/parameters/ifnonematch"
Expand Down Expand Up @@ -445,4 +464,4 @@ components:
type: array
items:
type: string
format: uuid
format: uuid

0 comments on commit 66a38f0

Please sign in to comment.