Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kish1n committed Aug 27, 2024
1 parent 9ed3923 commit c2f7ea7
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 77 deletions.
25 changes: 12 additions & 13 deletions docs/spec/components/schemas/DailyQuestionDetails.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ allOf:
example: Georgian capital
reward:
type: integer
format: int
description: reward for a correct answer
format: int64
description: Reward for a correct answer
options:
type: array
description: Answer options. Minimum 2, maximum 6
Expand All @@ -48,31 +48,30 @@ allOf:
correct_answer:
type: integer
format: int64
description: right answer index
description: Correct answer ID
time_for_answer:
type: integer
format: int64
description: time for answer
description: Time for answer
starts_at:
type: integer
format: time.Time
description: start date when this question is available, hours and minutes are always 0
type: string
description: Start date when this question is available, hours and minutes are always 0
example: "2024-08-26T00:00:00Z"
created_at:
type: integer
format: time.Time
description: start date when this question was create
type: string
description: Start date when this question was create
example: "2024-08-26T00:00:00Z"
num_correct_answers:
type: integer
format: int64
description: number of correct answers
description: Number of correct answers
num_incorrect_answers:
type: integer
format: int64
description: number of incorrect answers
description: Number of incorrect answers
num_all_participants:
type: integer
format: int64
description: |
users who received the question, those who answered and
Users who received the question, those who answered and
those who did not answer in the time given to them
13 changes: 6 additions & 7 deletions docs/spec/components/schemas/DailyQuestionEdit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ allOf:
example: Georgian capital
reward:
type: integer
format: int
description: reward for a correct answer
format: int64
description: Reward for a correct answer
options:
type: array
description: Answer options. Minimum 2, maximum 6
Expand All @@ -44,13 +44,12 @@ allOf:
correct_answer:
type: integer
format: int64
description: right answer index
description: Correct answer ID
time_for_answer:
type: integer
format: int64
description: time for answer
description: Time for answer
starts_at:
type: integer
format: time.Time
description: start date when this question is available, hours and minutes are always 0
type: string
description: Start date when this question is available, hours and minutes are always 0
example: "2024-08-23"
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,31 @@ post:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/Errors'
500:
$ref: '#/components/responses/internalError'

get:
tags:
- Daily Questions
summary: Filter Daily Question by start
description: |
Filtering of daily questions by their activation time
operationId: filterStartAtDailyQuestion
security:
- BearerAuth: []
responses:
200:
description: Success
content:
application/vnd.api+json:
schema:
type: object
required:
- data
properties:
data:
type: array
items:
$ref: '#/components/schemas/DailyQuestionDetails'
500:
$ref: '#/components/responses/internalError'

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
delete:
tags:
- Daily Questions
summary: Delete daily question
description: |
Delete Daily Question user must be superuser
operationId: deleteDailyQuestion
security:
- BearerAuth: []
responses:
200:
description: Success
content:
application/vnd.api+json:
schema:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/DailyQuestionDetails'
400:
$ref: '#/components/responses/invalidParameter'
404:
description: Question with ID not found
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/Errors'
500:
$ref: '#/components/responses/internalError'

patch:
tags:
- Daily Questions
Expand All @@ -18,7 +50,7 @@ patch:
- data
properties:
data:
$ref: '#/components/schemas/DailyQuestionEdit'
$ref: '#/components/schemas/DailyQuestionDetails'
400:
$ref: '#/components/responses/invalidParameter'
409:
Expand Down

0 comments on commit c2f7ea7

Please sign in to comment.