Skip to content

Commit 7b34fa1

Browse files
author
Guotong
committed
release: v0.3.0
0 parents  commit 7b34fa1

34 files changed

+2709
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Bug Report
2+
description: Report a reproducible bug
3+
labels: [bug]
4+
body:
5+
- type: textarea
6+
id: summary
7+
attributes:
8+
label: Summary
9+
description: What happened and what did you expect?
10+
validations:
11+
required: true
12+
13+
- type: textarea
14+
id: steps
15+
attributes:
16+
label: Steps to reproduce
17+
description: Share exact commands and sample OpenAPI files when possible.
18+
placeholder: |
19+
1. openapi-to-mcp run ...
20+
2. ...
21+
validations:
22+
required: true
23+
24+
- type: textarea
25+
id: logs
26+
attributes:
27+
label: Logs
28+
description: Paste relevant stack traces or command output.
29+
render: shell
30+
31+
- type: input
32+
id: version
33+
attributes:
34+
label: openapi-to-mcp version
35+
placeholder: 0.3.0
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Feature Request
2+
description: Propose an improvement or new capability
3+
labels: [enhancement]
4+
body:
5+
- type: textarea
6+
id: problem
7+
attributes:
8+
label: Problem
9+
description: What workflow is currently hard or impossible?
10+
validations:
11+
required: true
12+
13+
- type: textarea
14+
id: proposal
15+
attributes:
16+
label: Proposal
17+
description: What should be added or changed?
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
id: alternatives
23+
attributes:
24+
label: Alternatives considered
25+
description: Any workarounds or competing approaches.

.github/pull_request_template.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Summary
2+
3+
-
4+
5+
## Changes
6+
7+
-
8+
9+
## Verification
10+
11+
- [ ] `pytest -q`
12+
- [ ] `openapi-to-mcp list examples/store.yaml --json`
13+
14+
## Notes
15+
16+
-

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
python-version: ["3.10", "3.11", "3.12"]
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
python -m pip install -e .[dev]
29+
30+
- name: Run tests
31+
run: pytest -q
32+
33+
- name: Build package
34+
run: |
35+
python -m pip install build
36+
python -m build

.github/workflows/publish.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
id-token: write
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.11"
23+
24+
- name: Build package
25+
run: |
26+
python -m pip install --upgrade pip
27+
python -m pip install build twine
28+
python -m build
29+
twine check dist/*
30+
31+
- name: Publish to PyPI
32+
uses: pypa/gh-action-pypi-publish@release/v1
33+
with:
34+
password: ${{ secrets.PYPI_API_TOKEN }}

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
__pycache__/
2+
*.py[cod]
3+
*.egg-info/
4+
.pytest_cache/
5+
.venv/
6+
venv/
7+
.DS_Store
8+
build/
9+
dist/
10+
.mypy_cache/
11+
coverage.xml

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Changelog
2+
3+
## 0.3.0 - 2026-03-18
4+
5+
- Added external `$ref` resolution across local files and URLs.
6+
- Added nested `$ref` expansion support inside referenced external files.
7+
- Added Swagger 2 `in: body` parameter support as MCP tool request body.
8+
- Expanded tests to cover external references and legacy Swagger body mapping.
9+
10+
## 0.2.0 - 2026-03-18
11+
12+
- Added config file support (`--config`) with runtime, naming, and filter sections.
13+
- Added operation filtering by tags, methods, and operation IDs.
14+
- Added tool naming prefix support.
15+
- Added `mcp-config` command to generate ready-to-paste MCP client JSON.
16+
- Added `init-config` command to scaffold starter YAML config.
17+
- Improved base URL resolution for remote specs with relative `servers.url`.
18+
- Added CI workflow and package publish workflow.
19+
- Expanded test suite to cover config loading, filtering, and runtime behavior.
20+
21+
## 0.1.0 - 2026-03-18
22+
23+
- Initial release.
24+
- One-command OpenAPI/Swagger to MCP server runtime.
25+
- Supports local files and remote OpenAPI URLs.
26+
- Basic auth scheme mapping and structured tool results.

CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Contributing
2+
3+
Thanks for helping improve `openapi-to-mcp`.
4+
5+
## Local setup
6+
7+
```bash
8+
conda create -y -n openapi-mcp python=3.11
9+
conda run -n openapi-mcp python -m pip install -e .[dev]
10+
```
11+
12+
## Run checks
13+
14+
```bash
15+
conda run -n openapi-mcp pytest -q
16+
conda run -n openapi-mcp openapi-to-mcp list examples/store.yaml --json
17+
```
18+
19+
## Pull request guidelines
20+
21+
- Keep changes focused and small when possible.
22+
- Add tests for behavior changes.
23+
- Update docs when introducing flags or new commands.
24+
- Do not commit generated build artifacts from `dist/`.
25+
26+
## Release flow
27+
28+
- Tag format: `vX.Y.Z`.
29+
- GitHub Action `Publish` builds and uploads package to PyPI.
30+
- Ensure `PYPI_API_TOKEN` secret is configured before tagging.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 openapi-to-mcp contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)