Skip to content

fix: apply permissive model workaround to prevent pydantic validation errors on App Catalog SAML apps (closes #48) - #86

Open
botbikamordehai2-sketch wants to merge 1 commit into
okta:mainfrom
botbikamordehai2-sketch:fix/issue-48-1782820757
Open

fix: apply permissive model workaround to prevent pydantic validation errors on App Catalog SAML apps (closes #48)#86
botbikamordehai2-sketch wants to merge 1 commit into
okta:mainfrom
botbikamordehai2-sketch:fix/issue-48-1782820757

Conversation

@botbikamordehai2-sketch

Copy link
Copy Markdown

What

Multiple Pydantic ValidationError failures occur when listing or retrieving applications created from the Okta App Catalog (SAML templates) and Atlassian SWA templates. The SDK's auto-generated models enforce strict field requirements that do not match the actual API responses for these app types. A single invalid record poisons the entire response page for list_applications, list_applications with q=/filter=, and get_application.

Fix

Following the same pattern used for the existing LogSecurityContext user_behaviors workaround, we apply a monkey-patch to the Application model to make all fields optional and allow extra fields. This prevents the strict Pydantic validation from rejecting responses that contain fields not defined in the model or missing fields that the model expects. The fix ensures that all applications (regardless of template) can be returned without crashing on a single bad record.

Closes #48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pydantic validation errors block listing/retrieving Okta App Catalog SAML apps and Atlassian SWA apps; single bad record poisons entire response page

1 participant