From ef67b3bf5fde6bd93ecdf581cdfaaf0711b2f786 Mon Sep 17 00:00:00 2001 From: Julien Tant <785518+JulienTant@users.noreply.github.com> Date: Thu, 5 Jun 2025 09:31:42 -0700 Subject: [PATCH] Fix OpenAPI schema for custom profile attributes (#31070) --- api/v4/source/custom_profile_attributes.yaml | 64 +++++++++++++++++++- 1 file changed, 62 insertions(+), 2 deletions(-) diff --git a/api/v4/source/custom_profile_attributes.yaml b/api/v4/source/custom_profile_attributes.yaml index c7955c0cf9..12519fa272 100644 --- a/api/v4/source/custom_profile_attributes.yaml +++ b/api/v4/source/custom_profile_attributes.yaml @@ -53,7 +53,36 @@ type: type: string attrs: - type: string + type: object + properties: + visibility: + type: string + description: "Visibility of the attribute" + enum: ["hidden", "when_set", "always"] + default: "when_set" + sort_order: + type: number + description: "Sort order for displaying this attribute" + options: + type: array + description: "Options for select/multiselect fields" + items: + type: object + properties: + name: + type: string + color: + type: string + value_type: + type: string + description: "Type of text value" + enum: ["email", "url", "phone"] + ldap: + type: string + description: "LDAP attribute for syncing" + saml: + type: string + description: "SAML attribute for syncing" responses: "201": description: Custom Profile Attribute field creation successful @@ -106,7 +135,38 @@ type: type: string attrs: - type: string + type: object + properties: + visibility: + type: string + description: "Visibility of the attribute" + enum: ["hidden", "when_set", "always"] + default: "when_set" + sort_order: + type: number + description: "Sort order for displaying this attribute" + options: + type: array + description: "Options for select/multiselect fields" + items: + type: object + properties: + id: + type: string + name: + type: string + color: + type: string + value_type: + type: string + description: "Type of text value" + enum: ["email", "url", "phone"] + ldap: + type: string + description: "LDAP attribute for syncing" + saml: + type: string + description: "SAML attribute for syncing" responses: "200": description: Custom Profile Attribute field patch successful