openapi: 3.0.4 servers: - url: "http://anke-to.trap.jp/api" description: production - url: "http://anke-to-dev.trapti.tech/api" description: development - url: "http://anke-to-alpha.trap.show/api" description: alpha (deployed on noeshowcase; actual url is https) - url: "http://anke-to-beta.trap.show/api" description: beta (deployed on noeshowcase; actual url is https) - url: "http://localhost:1323/api" description: local info: title: anke-to API version: v3 description: anke-to API contact: name: traP url: "https://github.com/traPtitech/anke-to" tags: # TODO: リソースの分類でつけなおす - name: questionnaire - name: response - name: traq paths: # TODO 変数の命名を確認する /questionnaires: # TODO: 取得個数可変でもいいかも get: operationId: getQuestionnaires tags: - questionnaire description: 与えられた条件を満たす20件以下のアンケートのリストを取得します。 parameters: - $ref: "#/components/parameters/sortInQuery" - $ref: "#/components/parameters/searchInQuery" - $ref: "#/components/parameters/pageInQuery" - $ref: "#/components/parameters/onlyTargetingMeInQuery" - $ref: "#/components/parameters/onlyAdministratedByMeInQuery" - $ref: "#/components/parameters/notOverDueInQuery" - $ref: "#/components/parameters/hasMyResponseInQuery" - $ref: "#/components/parameters/hasMyDraftInQuery" - $ref: "#/components/parameters/questionnaireisDraftInQuery" - $ref: "#/components/parameters/countOnlyInQuery" responses: "200": description: 正常に取得できました。アンケートの配列を返します。 content: application/json: schema: $ref: "#/components/schemas/QuestionnaireList" "400": description: 与えられた情報の形式が異なります "500": description: アンケートを正常に取得できませんでした "503": description: SQLの実行時間が3sを超えた場合。主に正規表現が原因。 post: operationId: postQuestionnaire tags: - questionnaire description: 新しいアンケートを作成します。 requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/NewQuestionnaire" responses: "201": description: 正常にアンケートを作成できました。作成されたアンケートを返します。 content: application/json: schema: $ref: "#/components/schemas/QuestionnaireDetail" "400": description: 与えられた情報の形式が異なります "500": description: アンケートを正常に作成できませんでした /questionnaires/{questionnaireID}: get: operationId: getQuestionnaire tags: - questionnaire description: アンケートの情報を取得します。 parameters: - $ref: "#/components/parameters/questionnaireIDInPath" responses: "200": description: 正常に取得できました。 content: application/json: schema: $ref: "#/components/schemas/QuestionnaireDetail" "400": description: アンケートのIDが無効です "404": description: アンケートが存在しません "500": description: アンケートを正常に取得できませんでした patch: operationId: editQuestionnaire tags: - questionnaire description: アンケートの情報を変更します。匿名のアンケートを非匿名アンケートに変更することができません。admin/targetがnullの場合は管理者/対象者を変更しません。 parameters: - $ref: "#/components/parameters/questionnaireIDInPath" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/EditQuestionnaire" responses: "200": description: 正常にアンケートを変更できました。 "400": description: アンケートのIDが無効です "405": description: 匿名のアンケートを非匿名アンケートに変更することができません "500": description: 正常にアンケートを変更できませんでした delete: operationId: deleteQuestionnaire tags: - questionnaire description: アンケートを削除します。 parameters: - $ref: "#/components/parameters/questionnaireIDInPath" responses: "200": description: 正常にアンケートを削除できました。 "400": description: アンケートのIDが無効です "500": description: アンケートの削除ができませんでした /questionnaires/{questionnaireID}/close: post: operationId: closeQuestionnaire tags: - questionnaire description: アンケートをサーバー時刻で即座に終了します。 parameters: - $ref: "#/components/parameters/questionnaireIDInPath" responses: "200": description: 正常にアンケートを終了できました。 "400": description: アンケートのIDが無効です "403": description: アンケートの管理者ではありません "404": description: アンケートが存在しません "500": description: アンケートを正常に終了できませんでした /questionnaires/{questionnaireID}/myRemindStatus: get: operationId: getQuestionnaireMyRemindStatus tags: - questionnaire description: 自分に対するリマインドが有効かどうかを取得します。 parameters: - $ref: "#/components/parameters/questionnaireIDInPath" responses: "200": description: 正常に取得できました。 content: application/json: schema: $ref: "#/components/schemas/QuestionnaireIsRemindEnabled" "400": description: アンケートのIDが無効です "404": description: アンケートが存在しません "500": description: リマインド設定を正常に取得できませんでした patch: operationId: editQuestionnaireMyRemindStatus tags: - questionnaire description: 自分に対するリマインドが有効かどうかを変更します。 parameters: - $ref: "#/components/parameters/questionnaireIDInPath" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/QuestionnaireIsRemindEnabled" responses: "200": description: 正常に変更できました。 "400": description: アンケートのIDが無効です "404": description: アンケートが存在しません "500": description: リマインド設定を正常に変更できませんでした /questionnaires/{questionnaireID}/responses: get: operationId: getQuestionnaireResponses tags: - questionnaire description: アンケートの全ての回答を取得します。匿名回答の場合はrespondentを返しません。 parameters: - $ref: "#/components/parameters/questionnaireIDInPath" - $ref: "#/components/parameters/responseSortInQuery" - $ref: "#/components/parameters/onlyMyResponseInQuery" - $ref: "#/components/parameters/isDraftInQuery" responses: "200": description: 正常に取得できました。 content: application/json: schema: $ref: "#/components/schemas/Responses" "400": description: アンケートのIDが無効です "404": description: アンケートが存在しません "500": description: 回答を正常に取得できませんでした post: operationId: postQuestionnaireResponse tags: - questionnaire description: 新しい回答を作成します。アンケートが複数回答可能でない場合、過去の回答が削除されます。 parameters: - $ref: "#/components/parameters/questionnaireIDInPath" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/NewResponse" responses: "201": description: 正常に回答を作成できました。作成された回答を返します。 content: application/json: schema: $ref: "#/components/schemas/Response" "400": description: 与えられた情報の形式が異なります "404": description: アンケートが存在しません "422": description: 回答期限が過ぎたため回答できません "500": description: 正常に回答が作成できませんでした /responses/{responseID}: get: operationId: getResponse tags: - response description: 回答を取得します。 parameters: - $ref: "#/components/parameters/responseIDInPath" responses: "200": description: 正常に取得できました。 content: application/json: schema: $ref: "#/components/schemas/Response" "400": description: responseIDが無効です "403": description: 回答を閲覧する権限がありません。 "404": description: 回答が存在しません "500": description: 回答を正常に取得できませんでした patch: operationId: editResponse tags: - response description: 回答を変更します。 parameters: - $ref: "#/components/parameters/responseIDInPath" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/EditResponse" responses: "200": description: 正常に回答を変更できました "400": description: 与えられた回答の情報が異なります "403": description: 回答を変更する権限がありません "404": description: アンケートの回答の期限がきれたため回答が存在しません "405": description: 回答期限が過ぎたため回答できません "500": description: responseIDを取得できませんでした delete: operationId: deleteResponse tags: - response description: 回答を削除します parameters: - $ref: "#/components/parameters/responseIDInPath" responses: "200": description: 正常に回答を削除できました "400": description: 与えられた回答の情報が異なります "403": description: 回答を削除する権限がありません。 "404": description: アンケートの回答の期限がきれたため回答が存在しません "405": description: 回答期限が過ぎたため回答を削除できません "500": description: responseIDを取得できませんでした /responses/myResponses: get: operationId: getMyResponses tags: - response description: 自分のすべての回答のリストを、アンケートごとにまとめてページ単位で取得します。 parameters: - $ref: "#/components/parameters/pageInQuery" - $ref: "#/components/parameters/questionnaireIDsInQuery" - $ref: "#/components/parameters/isDraftInQuery" responses: "200": description: 正常に取得できました。ページ情報付きの回答一覧を返します。 content: application/json: schema: $ref: "#/components/schemas/ResponsesWithQuestionnaireInfo" "400": description: 与えられた情報の形式が異なります "500": description: 自分の回答のリストを取得できませんでした /traq/users: get: operationId: getTraqUsers tags: - traq description: traQのユーザー一覧を取得します。 responses: "200": description: 正常に取得できました。ユーザーの配列を返します。 content: application/json: schema: $ref: "#/components/schemas/TraqUsers" "500": description: ユーザー一覧を正常に取得できませんでした /traq/users/me: get: operationId: getTraqUsersMe tags: - traq description: リクエストユーザーのtraQ情報を取得します。 responses: "200": description: 正常に取得できました。 content: application/json: schema: $ref: "#/components/schemas/TraqUser" "404": description: 対象ユーザーが見つかりませんでした "500": description: ユーザー情報を正常に取得できませんでした /traq/groups: get: operationId: getTraqGroups tags: - traq description: traQのグループ一覧を取得します。 responses: "200": description: 正常に取得できました。グループの配列を返します。 content: application/json: schema: $ref: "#/components/schemas/TraqGroups" "500": description: グループ一覧を正常に取得できませんでした /traq/stamps: get: operationId: getTraqStamps tags: - traq description: traQのスタンプ一覧を取得します。 responses: "200": description: 正常に取得できました。スタンプの配列を返します。 content: application/json: schema: $ref: "#/components/schemas/TraqStamps" "500": description: スタンプ一覧を正常に取得できませんでした /traq/channels: get: operationId: getTraqChannels tags: - traq description: traQのチャンネル一覧を取得します。 responses: "200": description: 正常に取得できました。チャンネルの配列を返します。 content: application/json: schema: $ref: "#/components/schemas/TraqChannels" "500": description: チャンネル一覧を正常に取得できませんでした components: parameters: sortInQuery: name: sort in: query description: 並び順 (作成日時が新しい "created_at", 作成日時が古い "-created_at", タイトルの昇順 "title", タイトルの降順 "-title", 更新日時が新しい "modified_at", 更新日時が古い "-modified_at" ) schema: $ref: "#/components/schemas/SortType" responseSortInQuery: name: sort in: query description: 並び順 (作成日時が新しい "submitted_at", 作成日時が古い "-submitted_at", TraqIDの昇順 "traqid", TraqIDの降順 "-traqid", 更新日時が新しい "modified_at", 更新日時が古い "-modified_at" ) schema: $ref: "#/components/schemas/ResponseSortType" searchInQuery: name: search in: query description: タイトルの検索 schema: type: string pageInQuery: name: page in: query description: 何ページ目か (未定義の場合は1ページ目) schema: type: integer onlyTargetingMeInQuery: name: onlyTargetingMe in: query description: | 自分がターゲットになっているもののみ取得 (true), ターゲットになっているものも含めてすべて取得 (false)。デフォルトはfalse。 schema: type: boolean onlyAdministratedByMeInQuery: name: onlyAdministratedByMe in: query description: | 自分が管理者になっているもののみ取得 (true), 管理者になっていないものも含めてすべて取得 (false)。デフォルトはfalse。 schema: type: boolean onlyMyResponseInQuery: name: onlyMyResponse in: query description: | 自分の回答のみ取得 (true), 自分の回答以外も含めてすべて取得 (false)。デフォルトはfalse。 schema: type: boolean isDraftInQuery: name: isDraft in: query description: | trueの場合、下書きのみを取得する。falseの場合、下書きではないもののみを取得する。存在しない場合はすべて取得する。 schema: type: boolean notOverDueInQuery: name: notOverDue in: query description: | 回答期限が過ぎていないもののみ取得 (true), 回答期限が過ぎているものも含めてすべて取得 (false)。デフォルトはfalse。 schema: type: boolean hasMyResponseInQuery: name: hasMyResponse in: query description: | trueの場合、自分の回答(下書きを除く)が存在するアンケートのみを取得する。 falseの場合、自分の回答(下書きを除く)が存在しないアンケートのみを取得する。 存在しない場合、すべてのアンケートを取得する。 schema: type: boolean hasMyDraftInQuery: name: hasMyDraft in: query description: | trueの場合、自分の回答の下書きが存在するアンケートのみを取得する。 falseの場合、自分の回答の下書きが存在しないアンケートのみを取得する。 存在しない場合、すべてのアンケートを取得する。 schema: type: boolean questionnaireisDraftInQuery: name: isDraft in: query description: | trueの場合、自分が管理者である下書き(未公開)のアンケートのみを取得する。 falseの場合、公開済みのアンケートのみを取得する。 存在しない場合、公開済みのアンケートと自分が管理者である下書きのアンケートをすべて取得する。 schema: type: boolean countOnlyInQuery: name: countOnly in: query description: | trueの場合、questionnaires は空配列で返し、件数情報のみ取得する。page は無視される。 schema: type: boolean questionnaireIDsInQuery: name: questionnaireIDs in: query description: | 取得したい情報のアンケートをフィルタリングするためのパラメータ。複数指定可能。 schema: type: array items: type: integer explode: false questionnaireIDInPath: name: questionnaireID in: path required: true description: | アンケートID schema: type: integer responseIDInPath: name: responseID in: path required: true description: | 回答ID schema: type: integer schemas: # TODO: description, exampleを確認する SortType: type: string description: question、questionnaire用のソートの種類 enum: - created_at - -created_at - title - -title - modified_at - -modified_at x-enum-varnames: - CreatedAtASC - CreatedAtDESC - TitleASC - TitleDESC - ModifiedAtASC - ModifiedAtDESC ResponseSortType: type: string description: response用のsortの種類 enum: - submitted_at - -submitted_at - modified_at - -modified_at - traqid - -traqid x-enum-varnames: - SubmittedAtASC - SubmittedAtDESC - ModifiedAtASC - ModifiedAtDESC - TraqIdASC - TraqIdDESC ResShareType: type: string example: anyone enum: - admins - respondents - anyone description: | アンケートの結果を, 運営は見られる ("admins"), 回答済みの人は見られる ("respondents") 誰でも見られる ("anyone") QuestionnaireBase: allOf: - $ref: "#/components/schemas/QuestionnaireTitle" - $ref: "#/components/schemas/QuestionnaireDescription" - $ref: "#/components/schemas/QuestionnaireResponseDueDateTime" - $ref: "#/components/schemas/QuestionnaireResponseViewableBy" - $ref: "#/components/schemas/QuestionnaireIsAnonymous" - $ref: "#/components/schemas/QuestionnaireIsDuplicateAnswerAllowed" - $ref: "#/components/schemas/QuestionnaireIsPublished" NewQuestionnaire: allOf: - $ref: "#/components/schemas/QuestionnaireBase" - $ref: "#/components/schemas/QuestionnaireTargetsAndAdmins" - properties: questions: type: array items: $ref: "#/components/schemas/NewQuestion" required: - questions EditQuestionnaire: allOf: - $ref: "#/components/schemas/QuestionnaireID" - $ref: "#/components/schemas/QuestionnaireBase" - $ref: "#/components/schemas/EditQuestionnaireTargetsAndAdmins" - properties: questions: type: array items: $ref: "#/components/schemas/Question" required: - questions QuestionnaireDetail: allOf: - $ref: "#/components/schemas/QuestionnaireID" - $ref: "#/components/schemas/QuestionnaireBase" - $ref: "#/components/schemas/QuestionnaireCreatedAt" - $ref: "#/components/schemas/QuestionnaireModifiedAt" - $ref: "#/components/schemas/QuestionnaireTargetsAndAdmins" - properties: questions: type: array items: $ref: "#/components/schemas/Question" respondents: type: array items: $ref: "#/components/schemas/TraqId" description: | 回答者の一覧。匿名アンケートの場合は空配列。 respondent_count: type: integer minimum: 0 example: 3 description: | 回答した人数(ユニークな回答者数)。匿名アンケートでも実際の人数を返す。 重複回答が許可されている場合でも、同一ユーザーは1人として数える。 (respondents 配列は匿名時に空になるため、人数はこちらを参照する。) response_count: type: integer minimum: 0 example: 5 description: | 回答(提出)の総数。匿名アンケートでも実際の数を返す。 重複回答が許可されている場合は、同一ユーザーが複数回提出した回答もすべて数える。 重複が許可されていない場合は respondent_count と一致する。 targets: type: array items: $ref: "#/components/schemas/TraqId" description: | 対象者の一覧。(前回対象者を編集した時点で解析したグループ情報に基づいて作成されたもの) admins: type: array items: $ref: "#/components/schemas/TraqId" description: | 管理者の一覧。(前回対象者を編集した時点で解析したグループ情報に基づいて作成されたもの) required: - questions - respondents - targets - admins QuestionnaireSummary: # ResponseCountとRespondentCountを入れてもいいかも allOf: - $ref: "#/components/schemas/QuestionnaireID" - $ref: "#/components/schemas/QuestionnaireTitle" - $ref: "#/components/schemas/QuestionnaireDescription" - $ref: "#/components/schemas/QuestionnaireResponseDueDateTime" - $ref: "#/components/schemas/QuestionnaireResponseViewableBy" - $ref: "#/components/schemas/QuestionnaireIsAnonymous" - $ref: "#/components/schemas/QuestionnaireIsDuplicateAnswerAllowed" - $ref: "#/components/schemas/QuestionnaireIsPublished" - $ref: "#/components/schemas/QuestionnaireIsTargetingMe" - $ref: "#/components/schemas/QuestionnaireCreatedAt" - $ref: "#/components/schemas/QuestionnaireModifiedAt" - properties: has_my_draft: type: boolean description: 下書きが存在する has_my_response: type: boolean description: 回答が存在する is_administrated_by_me: type: boolean description: 自分が管理者になっているかどうか responded_date_time_by_me: type: string format: date-time all_responded: type: boolean example: true description: | すべての対象者が回答済みの場合 true を返す。それ以外は false を返す。 (対象者が存在しない場合は true を返す) required: - has_my_draft - has_my_response - is_administrated_by_me - all_responded QuestionnaireList: type: object properties: page_max: type: integer example: 1 description: | 合計のページ数 total_records: type: integer example: 42 description: | 現在の検索条件に一致するアンケートの総件数 questionnaires: type: array items: $ref: "#/components/schemas/QuestionnaireSummary" required: - page_max - total_records - questionnaires QuestionnaireID: type: object properties: questionnaire_id: type: integer example: 1 required: - questionnaire_id QuestionnaireTitle: type: object properties: title: type: string example: 第1回集会らん☆ぷろ募集アンケート required: - title QuestionnaireDescription: type: object properties: description: type: string example: 第1回メンバー集会でのらん☆ぷろで発表したい人を募集します らん☆ぷろで発表したい人あつまれー! required: - description QuestionnaireResponseDueDateTime: type: object properties: response_due_date_time: type: string format: date-time example: 2020-01-01T00:00:00+09:00 description: | 回答期限。この日時を過ぎたら回答できなくなる。nullの場合は回答期限なし。 QuestionnaireResponseViewableBy: type: object properties: response_viewable_by: $ref: "#/components/schemas/ResShareType" required: - response_viewable_by QuestionnaireIsAnonymous: type: object properties: is_anonymous: type: boolean example: true description: | 匿名回答かどうか required: - is_anonymous QuestionnaireIsDuplicateAnswerAllowed: type: object properties: is_duplicate_answer_allowed: type: boolean example: true description: | 一人が複数回回答できるかどうか required: - is_duplicate_answer_allowed QuestionnaireIsPublished: type: object properties: is_published: type: boolean example: true description: | アンケートが公開されているかどうか required: - is_published QuestionnaireIsTargetingMe: type: object properties: is_targeting_me: type: boolean example: true description: | 自分がターゲットになっているかどうか required: - is_targeting_me QuestionnaireCreatedAt: type: object properties: created_at: type: string format: date-time example: 2020-01-01T00:00:00+09:00 required: - created_at QuestionnaireModifiedAt: type: object properties: modified_at: type: string format: date-time example: 2020-01-01T00:00:00+09:00 required: - modified_at QuestionnaireTargetsAndAdmins: type: object properties: target: $ref: "#/components/schemas/UsersAndGroups" admin: $ref: "#/components/schemas/UsersAndGroups" required: - target - admin EditQuestionnaireTargetsAndAdmins: type: object properties: target: $ref: "#/components/schemas/UsersAndGroups" admin: $ref: "#/components/schemas/UsersAndGroups" QuestionnaireIsRemindEnabled: type: object properties: is_remind_enabled: type: boolean description: | 自分に対するリマインドが有効かどうか。ユーザーが対象者でありかつ回答していない場合、この値がtrueであればリマインドが送信される。 required: - is_remind_enabled NewQuestion: allOf: - $ref: "#/components/schemas/QuestionBase" - $ref: "#/components/schemas/QuestionSettingsByType" Question: allOf: - $ref: "#/components/schemas/QuestionBase" - $ref: "#/components/schemas/QuestionSettingsByType" - properties: question_id: type: integer description: | 質問を追加する場合はnull。 example: 1 created_at: type: string format: date-time example: 2020-01-01T00:00:00+09:00 description: | 質問を追加または編集する場合はnull。 QuestionBase: type: object properties: title: type: string description: type: string is_required: type: boolean description: | 回答必須かどうか required: - title - description - is_required QuestionSettingsByType: oneOf: - $ref: "#/components/schemas/QuestionSettingsText" - $ref: "#/components/schemas/QuestionSettingsTextLong" - $ref: "#/components/schemas/QuestionSettingsNumber" - $ref: "#/components/schemas/QuestionSettingsSingleChoice" - $ref: "#/components/schemas/QuestionSettingsMultipleChoice" - $ref: "#/components/schemas/QuestionSettingsScale" QuestionSettingsText: allOf: - $ref: "#/components/schemas/QuestionTypeText" - type: object properties: max_length: type: integer QuestionSettingsTextLong: allOf: - $ref: "#/components/schemas/QuestionTypeTextLong" - type: object properties: max_length: type: integer QuestionSettingsNumber: allOf: - $ref: "#/components/schemas/QuestionTypeNumber" - type: object properties: min_value: type: number format: double max_value: type: number format: double QuestionSettingsSingleChoice: allOf: - $ref: "#/components/schemas/QuestionTypeSingleChoice" - type: object properties: options: type: array items: type: string uniqueItems: true required: - options QuestionSettingsMultipleChoice: allOf: - $ref: "#/components/schemas/QuestionTypeMultipleChoice" - type: object properties: options: type: array items: type: string uniqueItems: true minItems: 1 required: - options QuestionSettingsScale: allOf: - $ref: "#/components/schemas/QuestionTypeScale" - type: object properties: min_value: type: integer max_value: type: integer min_label: type: string max_label: type: string required: - min_value - max_value QuestionTypeText: type: object properties: question_type: type: string enum: [Text] required: - question_type QuestionTypeTextLong: type: object properties: question_type: type: string enum: [TextLong] required: - question_type QuestionTypeNumber: type: object properties: question_type: type: string enum: [Number] required: - question_type QuestionTypeSingleChoice: type: object properties: question_type: type: string enum: [SingleChoice] required: - question_type QuestionTypeMultipleChoice: type: object properties: question_type: type: string enum: [MultipleChoice] required: - question_type QuestionTypeScale: type: object properties: question_type: type: string enum: [Scale] required: - question_type NewResponse: type: object properties: is_draft: type: boolean example: true body: type: array items: $ref: "#/components/schemas/NewResponseBody" minItems: 1 required: - is_draft - body Response: allOf: - $ref: "#/components/schemas/QuestionnaireID" - type: object properties: response_id: type: integer example: 1 respondent: allOf: - $ref: "#/components/schemas/TraqId" description: | 回答者のtraQ ID。匿名回答の場合は返しません。 is_anonymous: type: boolean example: true submitted_at: type: string format: date-time example: 2020-01-01T00:00:00+09:00 modified_at: type: string format: date-time example: 2020-01-01T00:00:00+09:00 is_draft: type: boolean example: true body: type: array items: $ref: "#/components/schemas/ResponseBody" required: - response_id - is_anonymous - submitted_at - modified_at - is_draft - body EditResponse: allOf: - type: object properties: response_id: type: integer example: 1 - $ref: "#/components/schemas/NewResponse" Responses: type: array items: $ref: "#/components/schemas/Response" ResponsesWithQuestionnaireInfo: type: object properties: page_max: type: integer example: 1 description: | 合計のページ数 response_groups: type: array items: $ref: "#/components/schemas/ResponseWithQuestionnaireInfoItem" required: - page_max - response_groups QuestionnaireInfo: type: object allOf: - $ref: "#/components/schemas/QuestionnaireTitle" - $ref: "#/components/schemas/QuestionnaireResponseDueDateTime" - $ref: "#/components/schemas/QuestionnaireCreatedAt" - $ref: "#/components/schemas/QuestionnaireModifiedAt" - $ref: "#/components/schemas/QuestionnaireIsTargetingMe" ResponseWithQuestionnaireInfoItem: type: object properties: questionnaire_info: $ref: "#/components/schemas/QuestionnaireInfo" responses: type: array items: $ref: "#/components/schemas/Response" required: - questionnaire_info - responses description: | 同じアンケートの回答情報をまとめて返す。 NewResponseBody: allOf: - type: object properties: question_id: type: integer required: - question_id - oneOf: - $ref: "#/components/schemas/ResponseBodyText" - $ref: "#/components/schemas/ResponseBodyTextLong" - $ref: "#/components/schemas/ResponseBodyNumber" - $ref: "#/components/schemas/ResponseBodySingleChoice" - $ref: "#/components/schemas/ResponseBodyMultipleChoice" - $ref: "#/components/schemas/ResponseBodyScale" ResponseBody: allOf: - type: object properties: question_id: type: integer required: - question_id - oneOf: - $ref: "#/components/schemas/ResponseBodyText" - $ref: "#/components/schemas/ResponseBodyTextLong" - $ref: "#/components/schemas/ResponseBodyNumber" - $ref: "#/components/schemas/ResponseBodySingleChoice" - $ref: "#/components/schemas/ResponseBodyMultipleChoice" - $ref: "#/components/schemas/ResponseBodyScale" ResponseBodyText: allOf: - $ref: "#/components/schemas/QuestionTypeText" - $ref: "#/components/schemas/ResponseBodyBaseString" ResponseBodyTextLong: allOf: - $ref: "#/components/schemas/QuestionTypeTextLong" - $ref: "#/components/schemas/ResponseBodyBaseString" ResponseBodyNumber: allOf: - $ref: "#/components/schemas/QuestionTypeNumber" - $ref: "#/components/schemas/ResponseBodyBaseNumber" ResponseBodySingleChoice: allOf: - $ref: "#/components/schemas/QuestionTypeSingleChoice" - $ref: "#/components/schemas/ResponseBodyBaseString" ResponseBodyMultipleChoice: allOf: - $ref: "#/components/schemas/QuestionTypeMultipleChoice" - type: object properties: answer: type: array items: type: string uniqueItems: true required: - answer ResponseBodyScale: allOf: - $ref: "#/components/schemas/QuestionTypeScale" - $ref: "#/components/schemas/ResponseBodyBaseInteger" ResponseBodyBaseString: type: object properties: answer: type: string required: - answer ResponseBodyBaseNumber: type: object properties: answer: type: number format: double required: - answer ResponseBodyBaseInteger: type: object properties: answer: type: integer required: - answer UsersAndGroups: type: object properties: users: $ref: "#/components/schemas/Users" groups: $ref: "#/components/schemas/Groups" required: - users - groups Users: type: array items: $ref: "#/components/schemas/TraqId" description: | ユーザーIDの一覧。 TraqId: type: string example: cp20 description: | traQ ID Groups: type: array items: type: string format: uuid description: | Group UUID TraqUsers: type: array items: $ref: "#/components/schemas/TraqUser" TraqUser: type: object properties: id: type: string format: uuid name: type: string description: traQ ID icon_file_id: type: string format: uuid is_bot: type: boolean required: - id - name - icon_file_id - is_bot TraqUserGroupMember: type: object properties: id: type: string format: uuid role: type: string required: - id - role TraqUserGroupMembers: type: array items: $ref: "#/components/schemas/TraqUserGroupMember" TraqGroups: type: array items: $ref: "#/components/schemas/TraqGroup" TraqGroup: type: object properties: id: type: string format: uuid name: type: string members: $ref: "#/components/schemas/TraqUserGroupMembers" required: - id - name - members TraqStamps: type: array items: $ref: "#/components/schemas/TraqStamp" TraqStamp: type: object properties: id: type: string format: uuid name: type: string file_id: type: string format: uuid required: - id - name - file_id TraqChannels: type: array items: $ref: "#/components/schemas/TraqChannel" TraqChannel: type: object properties: id: type: string format: uuid name: type: string path: type: string required: - id - name