From ac2395666341a766f4f96c1addfdafd36431e944 Mon Sep 17 00:00:00 2001 From: Greta Quadrati <75862507+gquadrati@users.noreply.github.com> Date: Tue, 14 Nov 2023 14:57:28 +0100 Subject: [PATCH] [#IOPID-1045] Update Profile definitions (#342) * [#IOPID-1045] add is_email_already_taken property to ExtendedProfile * [#IOPID-1045] add new problemJson_definitions.yaml file + add UpdateProfile412ErrorTypes definition * [#IOPID-1045] add default false to IsEmailAlreadyTaken --- openapi/definitions.yaml | 9 +++++++++ openapi/problemJson_definitions.yaml | 7 +++++++ 2 files changed, 16 insertions(+) create mode 100644 openapi/problemJson_definitions.yaml diff --git a/openapi/definitions.yaml b/openapi/definitions.yaml index 0091a0a4..8517c3ed 100644 --- a/openapi/definitions.yaml +++ b/openapi/definitions.yaml @@ -773,6 +773,8 @@ ExtendedProfile: $ref: "#/IsEmailEnabled" is_email_validated: $ref: "#/IsEmailValidated" + is_email_already_taken: + $ref: "#/IsEmailAlreadyTaken" reminder_status: $ref: "#/ReminderStatus" is_test_profile: @@ -786,6 +788,7 @@ ExtendedProfile: required: - is_email_enabled - is_email_validated + - is_email_already_taken - is_inbox_enabled - is_webhook_enabled - service_preferences_settings @@ -794,6 +797,12 @@ IsEmailValidated: type: boolean description: |- True if the user email has been validated. +IsEmailAlreadyTaken: + type: boolean + default: false + description: |- + True if the user email has been validated by another user. + If so, the user must provide a new email. IsInboxEnabled: type: boolean description: |- diff --git a/openapi/problemJson_definitions.yaml b/openapi/problemJson_definitions.yaml new file mode 100644 index 00000000..4a7b74b9 --- /dev/null +++ b/openapi/problemJson_definitions.yaml @@ -0,0 +1,7 @@ +UpdateProfile412ErrorTypes: + type: string + description: |- + List of error types returned by the updateProfile endpoint when the HTTP status code is 412 + x-extensible-enum: + - https://ioapp.it/problems/email-already-taken + example: https://ioapp.it/problems/email-already-taken \ No newline at end of file