Skip to content

Commit 779ab5c

Browse files
authored
Merge pull request #1266 from traPtitech/fix/separate-component-openapi-array
refactor: openAPIのarrayのitemをcomponentに切り出し
2 parents d037e89 + 88e8daa commit 779ab5c

File tree

1 file changed

+38
-32
lines changed

1 file changed

+38
-32
lines changed

docs/swagger/swagger.yaml

+38-32
Original file line numberDiff line numberDiff line change
@@ -882,17 +882,20 @@ components:
882882
ResponsesWithQuestionnaireInfo:
883883
type: array
884884
items:
885-
allOf:
886-
- $ref: "#/components/schemas/Response"
887-
- type: object
888-
properties:
889-
questionnaire_info:
890-
allOf:
891-
- $ref: "#/components/schemas/QuestionnaireTitle"
892-
- $ref: "#/components/schemas/QuestionnaireResponseDueDateTime"
893-
- $ref: "#/components/schemas/QuestionnaireCreatedAt"
894-
- $ref: "#/components/schemas/QuestionnaireModifiedAt"
895-
- $ref: "#/components/schemas/QuestionnaireIsTargetingMe"
885+
$ref: "#/components/schemas/ResponseWithQuestionnaireInfoItem"
886+
ResponseWithQuestionnaireInfoItem:
887+
type: object
888+
allOf:
889+
- $ref: "#/components/schemas/Response"
890+
- type: object
891+
properties:
892+
questionnaire_info:
893+
allOf:
894+
- $ref: "#/components/schemas/QuestionnaireTitle"
895+
- $ref: "#/components/schemas/QuestionnaireResponseDueDateTime"
896+
- $ref: "#/components/schemas/QuestionnaireCreatedAt"
897+
- $ref: "#/components/schemas/QuestionnaireModifiedAt"
898+
- $ref: "#/components/schemas/QuestionnaireIsTargetingMe"
896899
ResponseBody:
897900
oneOf:
898901
- $ref: "#/components/schemas/ResponseBodyText"
@@ -960,27 +963,30 @@ components:
960963
Result:
961964
type: array
962965
items:
963-
allOf:
964-
- $ref: "#/components/schemas/QuestionnaireID"
965-
- type: object
966-
properties:
967-
response_id:
968-
type: integer
969-
example: 1
970-
submitted_at:
971-
type: string
972-
format: date-time
973-
example: 2020-01-01T00:00:00+09:00
974-
modified_at:
975-
type: string
976-
format: date-time
977-
example: 2020-01-01T00:00:00+09:00
978-
required:
979-
- response_id
980-
- respondent
981-
- submitted_at
982-
- modified_at
983-
- $ref: "#/components/schemas/NewResponse"
966+
$ref: "#/components/schemas/ResultItem"
967+
ResultItem:
968+
type: object
969+
allOf:
970+
- $ref: "#/components/schemas/QuestionnaireID"
971+
- type: object
972+
properties:
973+
response_id:
974+
type: integer
975+
example: 1
976+
submitted_at:
977+
type: string
978+
format: date-time
979+
example: 2020-01-01T00:00:00+09:00
980+
modified_at:
981+
type: string
982+
format: date-time
983+
example: 2020-01-01T00:00:00+09:00
984+
required:
985+
- response_id
986+
- respondent
987+
- submitted_at
988+
- modified_at
989+
- $ref: "#/components/schemas/NewResponse"
984990
UsersAndGroups:
985991
type: object
986992
properties:

0 commit comments

Comments
 (0)