Repository navigation
fix(client): read the OpenAPI document of openapi-spec-for-spring 1.0.2 - #57
Merged
Merged
Conversation
…napi-spec-for-spring 1.0.2 meshStack now puts the path parameters that all operations of a path share into the path item, and refers to shared parameters and responses with $ref. Parse failed on the parameters of a path item, and without the responses an operation lost its API version, so meshStack answered 406 or 415. Parse now reads only the HTTP methods of a path item, adds its parameters to each operation, and follows the $ref chains of parameters, request bodies and responses. A media type without a kind, such as application/vnd.meshcloud.api.v1.hal+json of GET /api, now has an API version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Parameter.PathKey holds x-meshstack-path-key, such as metadata.uuid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… test MESHSTACK_API_DOCS_URL also takes a file:// URL, which the satellite run of meshfed-release sets to the spec it generates. TestAccApiDocs checks that spec, and the GET test fills a path parameter from its x-meshstack-path-key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Coverage of the acceptance run against the meshStack backend, on
Uncovered functions
|
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.



openapi-shared-path-parameters
meshStack now writes its OpenAPI document with openapi-spec-for-spring 1.0.2. The new document has a different shape, and the CLI could not read it:
parameterskey next togetanddelete.Parseread every key of a path item as an HTTP method and failed on that array.$refs intocomponents/parametersandcomponents/responses. Some shared responses hold the versioned media types, so without following the refs an operation lost its API version, and meshStack answered 406 or 415.This PR:
Parsereads only the HTTP methods of a path item, adds the path-level parameters to each operation (the operation's own parameter of the samenameandinwins), and follows$refchains of parameters, request bodies and responses.application/vnd.meshcloud.api.v1.hal+jsonofGET /api, now has an API version.openapi.Parameter.PathKeyholdsx-meshstack-path-key, the metadata field that fills a path parameter.MESHSTACK_API_DOCS_URLalso takes afile://URL, so the acceptance suite tests against the spec of the meshStack it runs against.TestAccApiDocschecks that spec, and the GET test fills path parameters fromPathKey, because the new spec names them after their kind ({workspace},{tenant}).The acceptance suite passes against a spec generated from meshStack's develop branch.
Released CLIs v0.3.0 to v0.6.0 cannot read the new document. Once docs.meshcloud.io serves it, they send no versioned media type and get 406 on meshObject GETs. The release notes of the next release must tell users to upgrade.
Cross-repo PRs
🤖 Generated with Claude Code