Skip to content

Commit

Permalink
parameterとschemaを調整
Browse files Browse the repository at this point in the history
  • Loading branch information
reiroop committed Dec 8, 2023
1 parent 918893c commit 0715cc1
Showing 1 changed file with 11 additions and 30 deletions.
41 changes: 11 additions & 30 deletions docs/swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ paths:
- $ref: "#/components/parameters/sortInQuery"
- $ref: "#/components/parameters/searchInQuery"
- $ref: "#/components/parameters/pageInQuery"
- $ref: "#/components/parameters/nontargetedInQuery"
- $ref: "#/components/parameters/isTargetingMeInQuery"
responses:
"200":
description: 正常に取得できました。アンケートの配列を返します。
Expand Down Expand Up @@ -64,7 +64,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/NewQuestionnaireResponse"
$ref: "#/components/schemas/QuestionnaireDetail"
"400":
description: 与えられた情報の形式が異なります
"500":
Expand Down Expand Up @@ -499,8 +499,8 @@ components:
description: 何ページ目か (未定義の場合は1ページ目)
schema:
type: integer
nontargetedInQuery:
name: nontargeted
isTargetingMeInQuery:
name: isTargetingMe
in: query
description: |
自分がターゲットになっていないもののみ取得 (true), ターゲットになっているものも含めてすべて取得 (false)。デフォルトはfalse。
Expand Down Expand Up @@ -591,24 +591,6 @@ components:
- public
description: |
アンケートの結果を, 運営は見られる ("administrators"), 回答済みの人は見られる ("respondents") 誰でも見られる ("public")
QuestionnaireSummary:
allOf:
- $ref: "#/components/schemas/QuestionnaireID"
- $ref: "#/components/schemas/QuestionnaireTitle"
- $ref: "#/components/schemas/QuestionnaireDescription"
- $ref: "#/components/schemas/QuestionnaireResponseDueDateTime"
- $ref: "#/components/schemas/QuestionnaireResponseViewableBy"
- $ref: "#/components/schemas/QuestionnaireIsAnonymous"
- $ref: "#/components/schemas/QuestionnaireAllowsMultipleResponses"
- $ref: "#/components/schemas/QuestionnaireIsPublished"
- $ref: "#/components/schemas/QuestionnaireTargets"
- $ref: "#/components/schemas/QuestionnaireAdministrators"
QuestionnaireDetail:
allOf:
- $ref: "#/components/schemas/QuestionnaireID"
- $ref: "#/components/schemas/Questionnaire"
- $ref: "#/components/schemas/QuestionnaireCreatedAt"
- $ref: "#/components/schemas/QuestionnaireModifiedAt"
NewQuestionnaire:
allOf:
- $ref: "#/components/schemas/QuestionnaireTitle"
Expand All @@ -621,13 +603,13 @@ components:
- $ref: "#/components/schemas/QuestionnaireTargets"
- $ref: "#/components/schemas/QuestionnaireAdministrators"
- $ref: "#/components/schemas/QuestionnaireQuestions"
NewQuestionnaireResponse:
QuestionnaireDetail:
allOf:
- $ref: "#/components/schemas/QuestionnaireID"
- $ref: "#/components/schemas/Questionnaire"
- $ref: "#/components/schemas/NewQuestionnaire"
- $ref: "#/components/schemas/QuestionnaireCreatedAt"
- $ref: "#/components/schemas/QuestionnaireModifiedAt"
Questionnaire:
QuestionnaireSummary:
allOf:
- $ref: "#/components/schemas/QuestionnaireID"
- $ref: "#/components/schemas/QuestionnaireTitle"
Expand All @@ -637,7 +619,6 @@ components:
- $ref: "#/components/schemas/QuestionnaireIsAnonymous"
- $ref: "#/components/schemas/QuestionnaireAllowsMultipleResponses"
- $ref: "#/components/schemas/QuestionnaireIsPublished"
- $ref: "#/components/schemas/QuestionnaireQuestions"
QuestionnaireForList:
allOf:
- $ref: "#/components/schemas/Questionnaire"
Expand All @@ -659,13 +640,13 @@ components:
questionnaires:
type: array
items:
$ref: "#/components/schemas/QuestionnaireForList"
$ref: "#/components/schemas/QuestionnaireSummary"
required:
- page_max
- questionnaires
QuestionnaireByID:
allOf:
- $ref: "#/components/schemas/NewQuestionnaireResponse"
- $ref: "#/components/schemas/QuestionnaireDetail"
- type: object
properties:
respondents:
Expand All @@ -688,7 +669,7 @@ components:
- has_response
QuestionnaireMyAdministrates:
allOf:
- $ref: "#/components/schemas/NewQuestionnaireResponse"
- $ref: "#/components/schemas/QuestionnaireDetail"
- type: object
properties:
all_responded:
Expand All @@ -703,7 +684,7 @@ components:
- respondents
QuestionnaireUser:
allOf:
- $ref: "#/components/schemas/NewQuestionnaireResponse"
- $ref: "#/components/schemas/QuestionnaireDetail"
QuestionType:
type: string
example: Text
Expand Down

0 comments on commit 0715cc1

Please sign in to comment.