fix: add fields query param to listDevices for response field projection (OKTA-1277564) - #1712
Open
prachi-okta wants to merge 1 commit into
Open
prachi-okta wants to merge 1 commit into
prachi-okta wants to merge 1 commit into
Conversation
…ion (OKTA-1277564) DeviceIdentityFacadeV1.getDevices supports a fields query param for response field projection to reduce payload size, but the listDevices operation in the spec only documented after/limit/search/expand — fields could never be passed through the SDK. Adds fields as a new string query parameter on listDevices, documented with the accepted syntax (top-level fields, profile.<subfield> and profile:(...) composite syntax) per DeviceProjectionFieldValidator. Co-Authored-By: Claude Code
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.
Summary
DeviceIdentityFacadeV1.getDeviceshas a realfieldsquery param for response field projection (gated behindudcore.switch.enableProjectionsForListDevices), letting callers request a subset of fields to reduce response size.listDevicesoperation insrc/swagger/api.yamlonly documentedafter,limit,search,expand— there was no 5th slot forfields, so it was a hard SDK gap, not just a missing enum value.fieldsas a newtype: stringquery parameter (composite/comma-separated expression, not an enum) onlistDevices, documented per the accepted syntax fromDeviceProjectionFieldValidator:id,status,created,lastUpdated,profile,_links.profile.<subfield>orprofile:(<sub1>,<sub2>,...).idis always force-included even if omitted.Test plan
mvn -pl api generate-sourcesregeneratesDeviceApi.listDevices(String after, Integer limit, String search, String expand, String fields)(5th parameter added, matching the ticket's described gap) plus theadditionalHeadersoverload.mvn -pl api,impl install -DskipTestsbuilds cleanly with the new generated signature.getDeviceexpand fix applies: spec merge → SDK regenerated & new version published → version bump in okta-core → remote-mcp can then addfieldssupport tolist_devices.json+ListDevicesAction.java.AI Attribution:
ai-agent-authored