Repository navigation
feat: Support External References in OpenAPI MCP Tool Converter - #2214
Conversation
Signed-off-by: dolliecoder <[email protected]>
|
Welcome to the Microcks community! 💖 Thanks and congrats 🎉 for opening your first pull request here! Be sure to follow the pull request template or please update it accordingly. Hope you have a great time there! |
|
@lbroudoux PTAL when you get time |
…to smaller methods and use stable cache key Signed-off-by: dolliecoder <[email protected]>
|
@SebastienDegodez PTAL |
|
This pull request has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 30 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation. There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. Microcks is a Cloud Native Computing Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this pull request forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
|
You are now a Microcks community contributor! 💖 Thanks and congrats 🚀 on merging your first pull request! We are delighted and very proud of you! 👏 📢 If you're using Microcks in your organization, please add your company name to this list. 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact. If you need to know why and how to add yourself to the list, please read the blog post "Join the Microcks Adopters list and Empower the vibrant open source Community 🙌" Kudos and please keep going, we need you 🙌 |
Description
This PR implements the missing capability for the Microcks MCP Server to resolve and extract schemas from external
$refdefinitions (such as separate JSON or YAML schema files) when converting OpenAPI specifications into MCP tools.ResourceRepository: Updated theMcpControllerandOpenAPIMcpToolConverterconstructors to inject theResourceRepository, allowing the converter to fetch externally attachedResourcefiles linked to theService.getNodeForExternalReflogic from thereshaprio/reshaprproject. The algorithm correctly parses external file paths and JSON pointers (e.g.,models.yaml#/components/schemas/UserModel), locates the corresponding resource in the repository, and extracts the exact schema slice required.externalResourcesContent(Map<Resource, JsonNode>) to ensure high-performance schema resolution without redundant parsing on subsequent tool calls.testExternalReferenceResolutiontest case toOpenAPIMcpToolConverterTestwhich successfully mimics a multipart OpenAPI specification with external$refs and asserts that the finalMcpSchema.JsonSchemacontains the correctly mapped properties.Related issue(s)
Resolves #2210