Repository navigation
fix(openapi): support path-level parameters and preserve schema types… - #2360
Merged
Merged
Conversation
… in MCP tool converter Signed-off-by: Shelly Chahar <[email protected]>
shellyco-code
requested review from
SebastienDegodez,
lbroudoux and
yada
as code owners
October 12, 2026 06:28
lbroudoux
approved these changes
Oct 16, 2026
lbroudoux
left a comment
Member
There was a problem hiding this comment.
Thanks a ton for taking the time to push this one! Greatly appreciated!
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.
Fixes #2359
Summary
This PR adds support for path-level parameters and preserves parameter schema types in
OpenAPIMcpToolConverter.Changes
/paths/{path}/parametersand merged them with/paths/{path}/{verb}/parameters, allowing operation-level parameters to override path-level definitions with the same name.integer,boolean,number, etc.), formats, descriptions, and enums are retained ininputSchemainstead of defaulting all parameters to string.getCallResponseto extract path-level parameters intopathParams, allowing proper URI pattern substitution. Added defensive argument copying to avoid modifying caller inputs or failing on immutable maps.OpenAPIMcpToolConverterTestcovering path-level parameters, parameter schema type preservation, and operation-level override behavior.Verification
OpenAPIMcpToolConverterTest: 6 tests passing (0 failures, 0 errors).mvn spotless:apply(passes pre-commit hook).AI Usage Disclosure
In accordance with the Microcks AI Contribution Policy, this contribution was developed with assistance from Google Antigravity IDE (Gemini) for drafting the parameter extraction logic and test scaffolding. All changes and tests have been personally reviewed, verified, and tested.