Skip to content

Commit

Permalink
Merge pull request #1150 from traPtitech/feature/yaml-v2
Browse files Browse the repository at this point in the history
[chore] swagger.yamlの改修
  • Loading branch information
kaitoyama authored Dec 17, 2023
2 parents e412a04 + ec7b97d commit c9f24e2
Showing 1 changed file with 20 additions and 108 deletions.
128 changes: 20 additions & 108 deletions docs/swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -956,117 +956,29 @@ components:
required:
- answer
Result:
type: object
properties:
questionnaire_id:
type: integer
example: 1
response_count:
type: integer
example: 1
body:
type: array
items:
$ref: "#/components/schemas/ResultBody"
required:
- questionnaire_id
- response_count
- body
ResultBody:
oneOf:
- $ref: "#/components/schemas/ResultBodyText"
- $ref: "#/components/schemas/ResultBodyTextLong"
- $ref: "#/components/schemas/ResultBodyNumber"
- $ref: "#/components/schemas/ResultBodySingleChoice"
- $ref: "#/components/schemas/ResultBodyMultipleChoice"
- $ref: "#/components/schemas/ResultBodyScale"
ResultBodyText:
allOf:
- $ref: "#/components/schemas/QuestionTypeText"
- $ref: "#/components/schemas/ResultBodyBaseStringAnswer"
description: |
回答文ごとの回答数の配列
ResultBodyTextLong:
allOf:
- $ref: "#/components/schemas/QuestionTypeTextLong"
- $ref: "#/components/schemas/ResultBodyBaseStringAnswer"
description: |
回答文ごとの回答数の配列
ResultBodyNumber:
allOf:
- $ref: "#/components/schemas/QuestionTypeNumber"
- $ref: "#/components/schemas/ResultBodyBaseNumberAnswer"
description: |
数値ごとの回答数の配列
ResultBodySingleChoice:
allOf:
- $ref: "#/components/schemas/QuestionTypeSingleChoice"
- $ref: "#/components/schemas/ResultBodyBaseIntegerAnswer"
description: |
選択肢ごとの回答数の配列
ResultBodyMultipleChoice:
allOf:
- $ref: "#/components/schemas/QuestionTypeMultipleChoice"
- $ref: "#/components/schemas/ResultBodyBaseIntegerAnswer"
description: |
選択肢ごとの回答数の配列
ResultBodyScale:
allOf:
- $ref: "#/components/schemas/QuestionTypeScale"
- $ref: "#/components/schemas/ResultBodyBaseIntegerAnswer"
description: |
数値ごとの回答数の配列
ResultBodyBaseStringAnswer:
type: object
properties:
aggregated_answers:
type: array
items:
type: object
properties:
answer:
type: string
answer_count:
type: integer
required:
- answer
- answer_count
required:
- aggregated_answers
ResultBodyBaseNumberAnswer:
type: object
properties:
aggregated_answers:
type: array
items:
type: object
properties:
answer:
type: number
answer_count:
type: integer
required:
- answer
- answer_count
required:
- aggregated_answers
ResultBodyBaseIntegerAnswer:
type: object
properties:
aggregated_answers:
type: array
items:
type: object
type: array
items:
allOf:
- $ref: "#/components/schemas/QuestionnaireID"
- type: object
properties:
answer:
type: integer
answer_count:
response_id:
type: integer
example: 1
submitted_at:
type: string
format: date-time
example: 2020-01-01T00:00:00+09:00
modified_at:
type: string
format: date-time
example: 2020-01-01T00:00:00+09:00
required:
- answer
- answer_count
required:
- aggregated_answers
- response_id
- respondent
- submitted_at
- modified_at
- $ref: "#/components/schemas/NewResponse"
UsersAndGroups:
type: object
properties:
Expand Down

0 comments on commit c9f24e2

Please sign in to comment.