Skip to content

Commit

Permalink
Merge pull request #107 from GiganticMinecraft/feat/addAnswerTitle
Browse files Browse the repository at this point in the history
フォームに対する回答にタイトルを付与できるようにする
  • Loading branch information
rito528 authored Sep 8, 2023
2 parents 8129759 + b694005 commit 8aa5dc0
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
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

0 comments on commit 8aa5dc0

Please sign in to comment.