docs(location): document required REST headers - #784
Open
sakinaroufid wants to merge 2 commits into
Open
Conversation
The Location REST binding is the only one of the five REST bindings without an HTTP Headers section. Cart, catalog, checkout and order each render the header table and state the UCP-Agent requirement explicitly. source/services/common/rest.openapi.json marks Request-Id and UCP-Agent as required for both search_locations and lookup_locations, but the binding never said so. Those headers appeared only inside two envelope examples, so an implementer working from this page could reasonably read them as optional and ship a client that omits them. Add the section using the same header_fields macro and the same wording as the other bindings. The table is generated from the OpenAPI document, so it stays in sync with the contract rather than drifting from it.
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
docs/specification/common/location/rest.mdis the only one of the five REST bindings without an HTTP Headers section. Cart, catalog, checkout and order each render the header table through theheader_fieldsmacro and state the UCP-Agent requirement explicitly.source/services/common/rest.openapi.jsonmarksRequest-IdandUCP-Agentasrequired: truefor bothsearch_locationsandlookup_locations, but the binding never said so. Those two headers appear only inside the two envelope examples, so someone implementing from this page could reasonably read them as optional and ship a client that omits them.Change
Adds an HTTP Headers section ahead of Error Handling, using the same macro call and the same UCP-Agent wording as the catalog binding. The table is generated from the OpenAPI document, so it tracks the contract instead of drifting from it.
One file, 14 lines added.
Verification
mkdocs buildis clean and the section renders 12 request headers and 3 response headers, withRequest-IdandUCP-Agentboth marked required.scripts/validate_examples.py --schema-base source/schemas/: 343 passed, 0 failed.scripts/check_links.py: all internal links validated.Notes
No backport looks necessary. None of the three release branches contains the Location binding, since the capability landed on main in #589.
Two adjacent things I left out on purpose:
## Message Signingis present in the checkout and order bindings but missing from cart, catalog and location. That spans three bindings and is not specific to Location, so it seemed better as its own change.Authorization,Content-TypeandAcceptout of header parameters and intosecuritySchemesforshopping/rest.openapi.json.services/common/rest.openapi.jsonhas the same structure and is not covered by that PR. Because the table added here is generated from the OpenAPI document, it will pick up that change automatically whenever it is applied to the common service definition.