Skip to content

Fix Application partial updates, enum case-insensitivity, and test execution - #1706

Open
prachi-okta wants to merge 1 commit into
masterfrom
bugfixes
Open

Fix Application partial updates, enum case-insensitivity, and test execution#1706
prachi-okta wants to merge 1 commit into
masterfrom
bugfixes

Conversation

@prachi-okta

Copy link
Copy Markdown
Contributor

Summary

  • Add PartialApplicationUpdater, a helper that gives Application PUT requests real partial-update semantics: it fetches the existing application, merges in only the fields set on the caller's partial object, and replaces with the fully-populated result. Fixes partial updates failing when required sibling fields (e.g. name, credentials on OpenIdConnectApplication) are omitted.
  • Make generated enum deserialization case-insensitive (useEnumCaseInsensitive). KnowledgeConstraint/PossessionConstraint enums are uppercase, but the API sends lowercase values, so fromValue() was falling through to UNKNOWN_DEFAULT_OPEN_API.
  • Mark maxConsecutiveCharacters as EA in the spec, consistent with its sibling oelStatement field.
  • Fix Surefire silently running zero tests in the api module: an unused junit-jupiter dependency caused it to pick the JUnit Platform provider over TestNG, which every test in this repo actually uses.

Test plan

  • New unit tests for PartialApplicationUpdater covering partial updates that omit name and/or credentials
  • New unit tests for case-insensitive enum deserialization
  • Full suite passes: api and impl modules, all green
  • PartialApplicationUpdater additionally verified against a live test org

AI Attribution: ai-agent-authored

… execution (OKTA-1228269, OKTA-1232842, OKTA-1243191)

- PartialApplicationUpdater: gives Application PUT true partial-update
  semantics by fetching the existing app, merging in only the caller's
  set fields, and replacing with the fully-populated result. Fixes
  400s from omitting required sibling fields (name/credentials) on a
  partial OpenIdConnectApplication update. Rejects partial objects of
  a different concrete subtype than the existing application, rather
  than silently blending incompatible fields. Verified live against a
  real org in addition to unit tests.

- useEnumCaseInsensitive=true (api/pom.xml): KnowledgeConstraint and
  PossessionConstraint enums are uppercase but the Policy API sends
  lowercase; fromValue() was case-sensitive and fell through to
  UNKNOWN_DEFAULT_OPEN_API. Fixes OKTA-1232842 and OKTA-1243191.

- src/swagger/api.yaml: mark maxConsecutiveCharacters as EA, matching
  its sibling oelStatement - both are gated behind LIMITED_GA feature
  flags in okta-core, but only oelStatement disclosed that.

- pom.xml: explicit surefire-testng provider dependency. Every test in
  the repo is TestNG, but api's junit-jupiter dependency made Surefire
  silently pick the JUnit Platform provider, running zero tests while
  reporting BUILD SUCCESS.

Co-Authored-By: Claude Code
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