fix: make grant_types optional in OpenIdConnectApplicationSettingsClient#575
Open
alexander-vyh wants to merge 1 commit intookta:masterfrom
Open
fix: make grant_types optional in OpenIdConnectApplicationSettingsClient#575alexander-vyh wants to merge 1 commit intookta:masterfrom
alexander-vyh wants to merge 1 commit intookta:masterfrom
Conversation
The Okta API does not always return grant_types in OIDC app responses, but the OpenAPI spec marks it as required, causing UnmarshalJSON to fail with "no value given for required property grant_types". Applies the same fix pattern introduced in okta#559 (buttonField, allowMultipleAcsEndpoints) to a field that PR did not cover: - Remove grant_types from the required list in both spec YAML files - Remove from requiredProperties validation in UnmarshalJSON - Add omitempty to the JSON tag - Update constructor and getters accordingly Verified against a real Okta org: zero unmarshal errors across all apps after this change.
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
obvious fix
Summary
The Okta API does not always return
grant_typesin OIDC app responses,but the OpenAPI spec marks it as required. This causes
UnmarshalJSONtofail with:
Applies the same fix pattern introduced in #559 to a field that PR did
not cover. Changes:
grant_typesfrom therequiredlist in both spec YAML filesmake generate(working tree clean after)Fixes #N/A
Type of PR
Test Information
Go Version: go1.25.6 darwin/arm64
OS Version: macOS 15.7.2 (darwin/arm64)
OpenAPI Spec Version: openapi-generator-cli 7.15.0
Signoff
(Claiming the obvious fix exception — this change removes an incorrectly
required field with no new functionality added, following the same pattern
already established in fix: Remove required fields that are optional in API responses #559. If this does not qualify, please let me know
and I will sign the CLA promptly.)
make fmton my code