From dd915ccadbc835ee3c70c5750c8cc4b08552c84c Mon Sep 17 00:00:00 2001 From: rito528 <39003544+rito528@users.noreply.github.com> Date: Wed, 21 Jun 2023 21:07:41 +0900 Subject: [PATCH 1/4] =?UTF-8?q?form=E3=81=AE=E6=83=85=E5=A0=B1=E3=82=92?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=A8=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=83=AA=E3=83=9D=E3=82=A4=E3=83=B3=E3=83=88=E3=82=92?= =?UTF-8?q?=E7=94=9F=E3=82=84=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- schema/paths/forms/specifyForm/index.yml | 8 +++++ schema/types/forms/components.yml | 16 ++++++---- schema/types/forms/parameters.yml | 37 ++++++++++++++++++++++-- 3 files changed, 53 insertions(+), 8 deletions(-) diff --git a/schema/paths/forms/specifyForm/index.yml b/schema/paths/forms/specifyForm/index.yml index 6df456b..1961eb8 100644 --- a/schema/paths/forms/specifyForm/index.yml +++ b/schema/paths/forms/specifyForm/index.yml @@ -40,3 +40,11 @@ delete: '500': $ref: '../../../errors/errorResponses.yml#/components/responses/internalServerError' +patch: + operationId: updateForm + summary: フォームの値を更新する + parameters: + - $ref: '../../../types/forms/parameters.yml#/parameters/form_title' + - $ref: '../../../types/forms/parameters.yml#/parameters/form_description' + - $ref: '../../../types/forms/parameters.yml#/parameters/start_at' + - $ref: '../../../types/forms/parameters.yml#/parameters/end_at' diff --git a/schema/types/forms/components.yml b/schema/types/forms/components.yml index bc7d987..04da858 100644 --- a/schema/types/forms/components.yml +++ b/schema/types/forms/components.yml @@ -15,19 +15,23 @@ components: type: string nullable: true example: このフォームはお問い合わせをする際にご回答いただくフォームです。 + start_at: + description: 回答の受付を開始する日時 + type: string + format: date-time + end_at: + description: 回答の受付を終了する日時 + type: string + format: date-time response_period: description: 回答可能期間 type: object nullable: true properties: start_at: - description: 回答の受付を開始する日時 - type: string - format: date-time + $ref: '#/components/schemas/start_at' end_at: - description: 回答の受付を終了する日時 - type: string - format: date-time + $ref: '#/components/schemas/end_at' settings: description: フォームの設定 type: object diff --git a/schema/types/forms/parameters.yml b/schema/types/forms/parameters.yml index 9e0768e..f906de1 100644 --- a/schema/types/forms/parameters.yml +++ b/schema/types/forms/parameters.yml @@ -6,11 +6,44 @@ parameters: required: true schema: $ref: './components.yml#/components/schemas/id' + form_title: + name: formTitle + in: query + description: フォームのタイトル + required: false + schema: + $ref: './components.yml#/components/schemas/title' + form_description: + name: formDescription + in: query + description: フォームの説明 + required: false + schema: + $ref: './components.yml#/components/schemas/description' + start_at: + name: startAt + in: query + description: | + フォームの回答期間の開始日。 + 終了日(`end_at`)が指定されていない場合は失敗する可能性があります。 + 新たに設定する場合は`start_at`と`end_at`の両方を含めたパラメータを指定してください。 + required: false + schema: + $ref: './components.yml#/components/schemas/start_at' + end_at: + name: endAt + in: query + description: | + フォームの回答期間の終了日。 + 開始日(`start_at`)が指定されていない場合は失敗する可能性があります。 + 新たに設定する場合は`start_at`と`end_at`の両方を含めたパラメータを指定してください。 + required: false + schema: + $ref: './components.yml#/components/schemas/end_at' form_label_target: name: target in: query required: true - description: | - 何に対してのラベルを取得するかを取得するか。 + description: 何に対してのラベルを取得するかを取得するか。 schema: $ref: './components.yml#/components/schemas/kind_of_labels' From 788b2f968379b9cf7ad2509e64966907a150beed Mon Sep 17 00:00:00 2001 From: rito528 <39003544+rito528@users.noreply.github.com> Date: Wed, 21 Jun 2023 21:29:16 +0900 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20form=E3=81=AE=E5=80=A4=E3=82=92?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E3=81=99=E3=82=8B=E3=82=A8=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=83=AA=E3=83=9D=E3=82=A4=E3=83=B3=E3=83=88=E3=81=AE=E3=83=AC?= =?UTF-8?q?=E3=82=B9=E3=83=9D=E3=83=B3=E3=82=B9=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- schema/paths/forms/specifyForm/index.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/schema/paths/forms/specifyForm/index.yml b/schema/paths/forms/specifyForm/index.yml index 1961eb8..260992c 100644 --- a/schema/paths/forms/specifyForm/index.yml +++ b/schema/paths/forms/specifyForm/index.yml @@ -48,3 +48,18 @@ patch: - $ref: '../../../types/forms/parameters.yml#/parameters/form_description' - $ref: '../../../types/forms/parameters.yml#/parameters/start_at' - $ref: '../../../types/forms/parameters.yml#/parameters/end_at' + responses: + '200': + description: 指定されたFormの更新に成功 + content: + application/json: + schema: + $ref: '../../../types/forms/definitions.yml#/definitions/form' + '400': + $ref: '../../../errors/errorResponses.yml#/components/responses/syntaxError' + '401': + $ref: '../../../errors/errorResponses.yml#/components/responses/unauthorized' + '404': + $ref: '../../../errors/errorResponses.yml#/components/responses/notFound' + '500': + $ref: '../../../errors/errorResponses.yml#/components/responses/internalServerError' From b840e09f49c2af110d257971cb875d23afda648f Mon Sep 17 00:00:00 2001 From: rito528 <39003544+rito528@users.noreply.github.com> Date: Wed, 21 Jun 2023 21:36:44 +0900 Subject: [PATCH 3/4] =?UTF-8?q?docs:=20=E3=83=95=E3=82=A9=E3=83=BC?= =?UTF-8?q?=E3=83=A0=E3=81=AE=E6=9C=9F=E9=99=90=E3=81=8C=E5=90=AB=E3=81=BE?= =?UTF-8?q?=E3=82=8C=E3=82=8B=E3=81=93=E3=81=A8=E3=82=92=E3=83=89=E3=82=AD?= =?UTF-8?q?=E3=83=A5=E3=83=A1=E3=83=B3=E3=83=88=E3=81=AB=E8=A8=98=E8=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- schema/types/forms/parameters.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/schema/types/forms/parameters.yml b/schema/types/forms/parameters.yml index f906de1..a4deb28 100644 --- a/schema/types/forms/parameters.yml +++ b/schema/types/forms/parameters.yml @@ -25,6 +25,7 @@ parameters: in: query description: | フォームの回答期間の開始日。 + この開始日は回答可能期間に含まれます。 終了日(`end_at`)が指定されていない場合は失敗する可能性があります。 新たに設定する場合は`start_at`と`end_at`の両方を含めたパラメータを指定してください。 required: false @@ -35,6 +36,7 @@ parameters: in: query description: | フォームの回答期間の終了日。 + この終了日は回答可能期間に含まれます。 開始日(`start_at`)が指定されていない場合は失敗する可能性があります。 新たに設定する場合は`start_at`と`end_at`の両方を含めたパラメータを指定してください。 required: false From 9cf91016b23b1e4773d75ab52b0e170c3cd0af56 Mon Sep 17 00:00:00 2001 From: rito528 <39003544+rito528@users.noreply.github.com> Date: Wed, 21 Jun 2023 21:50:22 +0900 Subject: [PATCH 4/4] =?UTF-8?q?fix:=20=E6=8A=9C=E3=81=91=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=81=9Fparameter=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- schema/paths/forms/specifyForm/index.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/schema/paths/forms/specifyForm/index.yml b/schema/paths/forms/specifyForm/index.yml index 260992c..b16a5a1 100644 --- a/schema/paths/forms/specifyForm/index.yml +++ b/schema/paths/forms/specifyForm/index.yml @@ -44,6 +44,7 @@ patch: operationId: updateForm summary: フォームの値を更新する parameters: + - $ref: '../../../types/forms/parameters.yml#/parameters/id' - $ref: '../../../types/forms/parameters.yml#/parameters/form_title' - $ref: '../../../types/forms/parameters.yml#/parameters/form_description' - $ref: '../../../types/forms/parameters.yml#/parameters/start_at'