Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

フォームに対する回答にタイトルを付与できるようにする #107

Merged
merged 2 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions schema/paths/forms/[formId]/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ patch:
- $ref: "../../../types/forms/parameters.yml#/parameters/start_at"
- $ref: "../../../types/forms/parameters.yml#/parameters/end_at"
- $ref: "../../../types/forms/parameters.yml#/parameters/webhook_url"
- $ref: "../../../types/forms/parameters.yml#/parameters/default_title"
responses:
"200":
description: 指定されたFormの更新に成功
Expand Down
8 changes: 8 additions & 0 deletions schema/types/forms/components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ components:
webhook_url:
description: webhookのURL
type: string
default_title:
description: |
フォームに回答された内容に対して設定されるタイトル。
これが設定されていないとタイトルは「未設定」となります。
type: string
example: 未設定
settings:
description: フォームの設定
type: object
Expand All @@ -43,6 +49,8 @@ components:
$ref: "#/components/schemas/response_period"
webhook_url:
$ref: "#/components/schemas/webhook_url"
default_title:
$ref: "#/components/schemas/default_title"
created_at:
description: フォームの作成日時
type: string
Expand Down
5 changes: 5 additions & 0 deletions schema/types/forms/definitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ definitions:
timestamp:
type: string
format: date-time
title:
type: string
description: titleをnullにするとデフォルト設定が適用
example: "[hoge] 整地の心得違反"
nullable: true
answers:
type: array
uniqueItems: true
Expand Down
10 changes: 10 additions & 0 deletions schema/types/forms/parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ parameters:
required: false
schema:
$ref: "./components.yml#/components/schemas/webhook_url"
default_title:
name: defaultTitle
in: query
description: |
各回答に対してつけられるタイトル。
$[question_id]と指定することで質問のquestion_idに対応する回答を埋め込むことができます。
デフォルト値: 未設定
required: false
schema:
$ref: "./components.yml#/components/schemas/default_title"
form_label_target:
name: target
in: query
Expand Down