Skip to content

Commit

Permalink
fix: questionsにchoicesが書かれていなかったので追加
Browse files Browse the repository at this point in the history
  • Loading branch information
rito528 committed Oct 28, 2023
1 parent 5944159 commit 425d497
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
12 changes: 12 additions & 0 deletions schema/types/forms/components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ components:
- MULTIPLE
- SINGLE
example: TEXT
question_choices:
description: |
質問の選択肢の配列。
TEXT以外の場合は指定必須。
type: array
uniqueItems: true
minItems: 1
items:
type: string
example: []
is_required:
description: |
質問に対する解答を必須にする。
Expand All @@ -115,6 +125,8 @@ components:
$ref: "#/components/schemas/question_description"
question_type:
$ref: "#/components/schemas/question_type"
choices:
$ref: "#/components/schemas/question_choices"
is_required:
$ref: "#/components/schemas/is_required"
questions:
Expand Down
4 changes: 3 additions & 1 deletion schema/types/forms/definitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ definitions:
type: object
properties:
form_id:
$ref: "./components.yml#/components/schemas/id"
writeOnly: true
allOf:
- $ref: "./components.yml#/components/schemas/id"
questions:
$ref: "./components.yml#/components/schemas/questions"
question_id:
Expand Down

0 comments on commit 425d497

Please sign in to comment.