Skip to content

honour hiddenService in openapi spec and mcp catalog generation - #1311

Open
kali834x wants to merge 1 commit into
apache:masterfrom
kali834x:openapi-hidden-service
Open

kali834x wants to merge 1 commit into
apache:masterfrom
kali834x:openapi-hidden-service

Conversation

@kali834x

Copy link
Copy Markdown
Contributor

shouldIncludeService in OpenApiSpecGenerator decides which services appear in openapi.json/openapi.yaml (paths and components), the openapi-mcp.json tool catalog and the mcp resources list, but it only checks ignoredServices and exposeServiceMetadata. the /services listing on both render paths (ListingAgent.processListServices, HTTPTransportReceiver) treats hiddenService as a second, separate control and drops a service when either is set. so a service deployed with hiddenService=true is absent from /services, yet an unauthenticated GET /openapi-mcp.json or /openapi.json still returns its name, every operation endpoint and the reflected request/response schemas, and the mcp bridge registers those operations as callable tools. this adds the Utils.isHiddenService check next to the exposeServiceMetadata one, so all four generator loops skip the service. the new tests in OpenApiSpecGeneratorTest and McpCatalogGeneratorTest fail without the change, and the openapi module suite (272 tests) passes with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant