diff --git a/schema/types/forms/components.yml b/schema/types/forms/components.yml index c675a6e..38d7816 100644 --- a/schema/types/forms/components.yml +++ b/schema/types/forms/components.yml @@ -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: | 質問に対する解答を必須にする。 @@ -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: diff --git a/schema/types/forms/definitions.yml b/schema/types/forms/definitions.yml index 44b8460..aba7c2f 100644 --- a/schema/types/forms/definitions.yml +++ b/schema/types/forms/definitions.yml @@ -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: