Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Vasuk12
Copy link

@Vasuk12 Vasuk12 commented Nov 15, 2025

✨ Feature / Enhancement PR

πŸ”— Epic / Issue

Link to the epic or parent issue:
Closes # 1361


πŸš€ Summary (1-2 sentences)

What does this PR add or change?
This PR adds a basic OpenAPI β†’ Tool generator (V1) that parses a user-provided OpenAPI YAML/JSON file, extracts GET endpoints + simple schemas, and automatically generates corresponding REST tools with Bearer auth, saving them into generated_tools/tools.json

parser.py β€” loads the spec file (YAML/JSON)

Extracts:

  • GET endpoints only

  • Simple schemas (flat properties, type: string/integer/boolean)

  • Query parameters (parameters)

  • Converts parsed data into a normalized format for the generator

  1. Run the example OpenAPI spec through the generator:
python -m mcpgateway.openapi_generator.cli mcpgateway/openapi_generator/example.yaml --base-url https://dummy.api.com

πŸ§ͺ Checks

  • make lint passes
  • make test passes
  • CHANGELOG updated (if user-facing)

πŸ““ Notes (optional)

Design sketch, screenshots, or extra context.

Example.yaml
image

Parsed file to JSON
image
If the change introduces or alters an architectural decision, add or update an ADR in docs/docs/adr/ and link it here._

%% Example diagram - delete if not needed
flowchart TD
    A[Client] -->|POST /completions| B(MCPGateway)
    B --> C[Completion Service]





Loading

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