Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swagger.yamlの改修 #1148

Merged
merged 6 commits into from
Dec 16, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 32 additions & 11 deletions docs/swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ paths: # TODO 変数の命名を確認する
schema:
type: array
items:
$ref: "#/components/schemas/Responses"
$ref: "#/components/schemas/ResponsesWithQuestionnaireInfo"
"500":
description: 自分の回答のリストを取得できませんでした
components:
Expand Down Expand Up @@ -507,31 +507,28 @@ components:
- $ref: "#/components/schemas/QuestionnaireIsAnonymous"
- $ref: "#/components/schemas/QuestionnaireIsAllowingMultipleResponses"
- $ref: "#/components/schemas/QuestionnaireIsPublished"
- $ref: "#/components/schemas/QuestionnaireIsTargetingMe"
- $ref: "#/components/schemas/QuestionnaireCreatedAt"
- $ref: "#/components/schemas/QuestionnaireModifiedAt"
- properties:
is_targeting_me:
type: boolean
example: true
description: |
自分がターゲットになっているかどうか
responded_at:
type: string
format: date-time
has_my_draft:
type: boolean
description: 下書きが存在する
has_my_response:
type: boolean
description: 回答が存在する
responded_date_time_by_me:
type: string
format: date-time
all_responded:
type: boolean
example: true
description: |
すべての対象者が回答済みの場合 true を返す。それ以外は false を返す。 (対象者が存在しない場合は true を返す)
required:
- is_targeting_me
- responded_at
- has_my_draft
- has_my_response
- responded_date_time_by_me
- all_responded
QuestionnaireList:
type: object
Expand Down Expand Up @@ -617,6 +614,16 @@ components:
アンケートが公開されているかどうか
required:
- is_published
QuestionnaireIsTargetingMe:
type: object
properties:
is_targeting_me:
type: boolean
example: true
description: |
自分がターゲットになっているかどうか
required:
- is_targeting_me
QuestionnaireCreatedAt:
type: object
properties:
Expand Down Expand Up @@ -807,6 +814,20 @@ components:
type: array
items:
$ref: "#/components/schemas/Response"
ResponsesWithQuestionnaireInfo:
type: array
items:
allOf:
- $ref: "#/components/schemas/Response"
- type: object
properties:
questionnaire_info:
allOf:
- $ref: "#/components/schemas/QuestionnaireTitle"
- $ref: "#/components/schemas/QuestionnaireResponseDueDateTime"
- $ref: "#/components/schemas/QuestionnaireCreatedAt"
- $ref: "#/components/schemas/QuestionnaireModifiedAt"
- $ref: "#/components/schemas/QuestionnaireIsTargetingMe"
ResponseBody:
oneOf:
- $ref: "#/components/schemas/ResponseSettingsText"
Expand Down
Loading