Skip to content

Commit 7ce4d69

Browse files
authored
Merge pull request #1195 from traPtitech/feature/yaml-v2
[chore] swagger.yamlの修正
2 parents 7b3976e + b189698 commit 7ce4d69

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

docs/swagger/swagger.yaml

+12-6
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ components:
473473
description: |
474474
アンケートの結果を, 運営は見られる ("admins"), 回答済みの人は見られる ("respondents") 誰でも見られる ("anyone")
475475
476-
NewQuestionnaire:
476+
QuestionnaireBase:
477477
allOf:
478478
- $ref: "#/components/schemas/QuestionnaireTitle"
479479
- $ref: "#/components/schemas/QuestionnaireDescription"
@@ -483,6 +483,9 @@ components:
483483
- $ref: "#/components/schemas/QuestionnaireIsAllowingMultipleResponses"
484484
- $ref: "#/components/schemas/QuestionnaireIsPublished"
485485
- $ref: "#/components/schemas/QuestionnaireTargetsAndAdmins"
486+
NewQuestionnaire:
487+
allOf:
488+
- $ref: "#/components/schemas/QuestionnaireBase"
486489
- properties:
487490
questions:
488491
type: array
@@ -493,14 +496,21 @@ components:
493496
QuestionnaireDetail:
494497
allOf:
495498
- $ref: "#/components/schemas/QuestionnaireID"
496-
- $ref: "#/components/schemas/NewQuestionnaire"
499+
- $ref: "#/components/schemas/QuestionnaireBase"
497500
- $ref: "#/components/schemas/QuestionnaireCreatedAt"
498501
- $ref: "#/components/schemas/QuestionnaireModifiedAt"
499502
- properties:
503+
questions:
504+
type: array
505+
items:
506+
$ref: "#/components/schemas/Question"
500507
respondents:
501508
$ref: "#/components/schemas/Users"
502509
description: |
503510
回答者の一覧。匿名回答の場合はnull。
511+
required:
512+
- questions
513+
- respondents
504514
QuestionnaireSummary: # ResponseCountとRespondentCountを入れてもいいかも
505515
allOf:
506516
- $ref: "#/components/schemas/QuestionnaireID"
@@ -692,10 +702,6 @@ components:
692702
required:
693703
- question_id
694704
- created_at
695-
Questions:
696-
type: array
697-
items:
698-
$ref: "#/components/schemas/Question"
699705
QuestionBase:
700706
type: object
701707
properties:

0 commit comments

Comments
 (0)