@W-22726280 API Browser custom API paths and security-scheme type detection#458
Open
clavery wants to merge 1 commit into
Open
@W-22726280 API Browser custom API paths and security-scheme type detection#458clavery wants to merge 1 commit into
clavery wants to merge 1 commit into
Conversation
…ustom and shopper APIs
Custom APIs now display endpoint paths with the required
`/organizations/{organizationId}/...` prefix. Shopper/Admin
classification is now derived from the spec's declared security
schemes rather than the API family name, so shopper-named APIs in
non-shopper families (e.g. product/shopper-products,
checkout/shopper-baskets) and Custom APIs both auto-fetch the
correct token type.
Fixes #453
W-22726280
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
/organizations/{organizationId}prefix and inject the matching path parameter so Swagger UI displays — and "Try it out" calls — the correct URL. The platform routes Custom APIs as…/custom/{apiName}/{apiVersion}/organizations/{organizationId}/{userPath}but the spec stored by the schemas service only describes the developer-authored{userPath}portion.apiFamily.startsWith('shopper')heuristic with security-scheme detection (ShopperToken/ShopperTokenTaob→ Shopper;AmOAuth2/BearerToken→ Admin), withapiName.startsWith('shopper-')as the tiebreaker for mixed specs and a fallback to the old name/family heuristic for unrecognized schemes. This fixes token selection for shopper-named APIs that live under non-shopper families (product/shopper-products,checkout/shopper-baskets, …) and for Custom APIs which can be either type.(Custom)and uses the corrected name-based heuristic for the rest, since authoritative classification requires the loaded spec.Validated against all 69 schemas on a live tenant: 31 reclassifications, all justified by the actual declared security scheme.
Related
Test plan