Skip to content

fix: make grant_types optional in OpenIdConnectApplicationSettingsClient#575

Open
alexander-vyh wants to merge 1 commit intookta:masterfrom
alexander-vyh:fix/oidc-grant-types-optional
Open

fix: make grant_types optional in OpenIdConnectApplicationSettingsClient#575
alexander-vyh wants to merge 1 commit intookta:masterfrom
alexander-vyh:fix/oidc-grant-types-optional

Conversation

@alexander-vyh
Copy link

obvious fix

Summary

The Okta API does not always return grant_types in OIDC app responses,
but the OpenAPI spec marks it as required. This causes UnmarshalJSON to
fail with:

no value given for required property grant_types

Applies the same fix pattern introduced in #559 to a field that PR did
not cover. Changes:

  • Remove grant_types from the required list in both spec YAML files
  • Regenerated Go model via make generate (working tree clean after)
  • No other files affected

Fixes #N/A

Type of PR

  • Bug Fix (non-breaking fixes to existing functionality)

Test Information

  • My PR required test updates

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

  • I have submitted a CLA for this PR
    (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.)
  • Each commit message explains what the commit does
  • I have updated documentation to explain what my PR does
  • My code is covered by tests if required
  • I ran make fmt on my code
  • I did not edit any automatically generated files

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.
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.

1 participant