openapi-cli4ai 0.4.0__tar.gz → 0.5.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/.github/dependabot.yml +1 -1
- openapi_cli4ai-0.5.1/.github/workflows/ci.yml +48 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/.github/workflows/codeql.yml +3 -3
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/.github/workflows/publish.yml +5 -5
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/.gitignore +8 -0
- openapi_cli4ai-0.5.1/.pre-commit-config.yaml +7 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/CHANGELOG.md +35 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/PKG-INFO +2 -2
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/pyproject.toml +25 -2
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/src/openapi_cli4ai/cli.py +976 -343
- openapi_cli4ai-0.5.1/tests/__init__.py +0 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/tests/conftest.py +0 -4
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/tests/test_auth.py +1 -1
- openapi_cli4ai-0.5.1/tests/test_auth_flow_security.py +265 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/tests/test_auth_flows.py +16 -17
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/tests/test_caching.py +86 -4
- openapi_cli4ai-0.5.1/tests/test_cli_commands.py +455 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/tests/test_commands.py +29 -10
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/tests/test_coverage_gaps.py +5 -4
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/tests/test_device_flow.py +7 -8
- openapi_cli4ai-0.5.1/tests/test_error_handling.py +180 -0
- openapi_cli4ai-0.5.1/tests/test_features.py +313 -0
- openapi_cli4ai-0.5.1/tests/test_foundation.py +101 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/tests/test_oidc.py +1 -1
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/tests/test_run_command.py +85 -0
- openapi_cli4ai-0.5.1/tests/test_schema_composition.py +349 -0
- openapi_cli4ai-0.5.1/tests/test_security.py +740 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/tests/test_sse_streaming.py +2 -2
- openapi_cli4ai-0.5.1/tests/test_v040_hardening.py +279 -0
- openapi_cli4ai-0.5.1/uv.lock +704 -0
- openapi_cli4ai-0.4.0/.github/workflows/ci.yml +0 -36
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/.github/CODEOWNERS +0 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/.github/release.yml +0 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/CONTRIBUTING.md +0 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/LICENSE +0 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/README.md +0 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/SECURITY.md +0 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/demo.gif +0 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/examples/profiles.toml.example +0 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/openapi-cli4ai +0 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/src/openapi_cli4ai/__init__.py +0 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/src/openapi_cli4ai/__main__.py +0 -0
- /openapi_cli4ai-0.4.0/tests/__init__.py → /openapi_cli4ai-0.5.1/src/openapi_cli4ai/py.typed +0 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/tests/fixtures/petstore_spec.json +0 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/tests/test_integration.py +0 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/tests/test_profile_management.py +0 -0
- {openapi_cli4ai-0.4.0 → openapi_cli4ai-0.5.1}/tests/test_spec_parsing.py +0 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
20
|
+
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
|
|
21
|
+
with:
|
|
22
|
+
enable-cache: true
|
|
23
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
24
|
+
run: uv python install ${{ matrix.python-version }}
|
|
25
|
+
- name: Sync dependencies
|
|
26
|
+
run: uv sync --locked --python ${{ matrix.python-version }}
|
|
27
|
+
- name: Run unit tests with coverage
|
|
28
|
+
run: uv run --python ${{ matrix.python-version }} pytest tests/ -m "not integration" -v --cov=openapi_cli4ai --cov-report=term-missing
|
|
29
|
+
|
|
30
|
+
lint:
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
34
|
+
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
|
|
35
|
+
- name: Ruff check
|
|
36
|
+
run: uvx ruff check .
|
|
37
|
+
- name: Ruff format check
|
|
38
|
+
run: uvx ruff format --check .
|
|
39
|
+
|
|
40
|
+
typecheck:
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
44
|
+
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
|
|
45
|
+
- name: Sync dependencies
|
|
46
|
+
run: uv sync --locked
|
|
47
|
+
- name: Run mypy
|
|
48
|
+
run: uv run mypy src/openapi_cli4ai/ --ignore-missing-imports
|
|
@@ -16,8 +16,8 @@ jobs:
|
|
|
16
16
|
analyze:
|
|
17
17
|
runs-on: ubuntu-latest
|
|
18
18
|
steps:
|
|
19
|
-
- uses: actions/checkout@
|
|
20
|
-
- uses: github/codeql-action/init@
|
|
19
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
20
|
+
- uses: github/codeql-action/init@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v4.36.3
|
|
21
21
|
with:
|
|
22
22
|
languages: python
|
|
23
|
-
- uses: github/codeql-action/analyze@
|
|
23
|
+
- uses: github/codeql-action/analyze@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v4.36.3
|
|
@@ -13,12 +13,12 @@ jobs:
|
|
|
13
13
|
permissions:
|
|
14
14
|
contents: read
|
|
15
15
|
steps:
|
|
16
|
-
- uses: actions/checkout@
|
|
17
|
-
- uses: astral-sh/setup-uv@
|
|
16
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
17
|
+
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
|
|
18
18
|
- name: Build sdist and wheel
|
|
19
19
|
run: uv build
|
|
20
20
|
- name: Upload artifacts
|
|
21
|
-
uses: actions/upload-artifact@
|
|
21
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
22
22
|
with:
|
|
23
23
|
name: dist
|
|
24
24
|
path: dist/
|
|
@@ -42,8 +42,8 @@ jobs:
|
|
|
42
42
|
name: dist
|
|
43
43
|
path: dist/
|
|
44
44
|
- name: Generate attestations
|
|
45
|
-
uses: actions/attest-build-provenance@
|
|
45
|
+
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
|
|
46
46
|
with:
|
|
47
47
|
subject-path: dist/*
|
|
48
48
|
- name: Publish to PyPI
|
|
49
|
-
uses: pypa/gh-action-pypi-publish@
|
|
49
|
+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
|
|
@@ -4,6 +4,41 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
|
6
6
|
|
|
7
|
+
## [0.5.1] - 2026-07-04
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Ingest YAML OpenAPI specs served as `application/vnd.oai.openapi` (e.g. Codecov's schema endpoint), with a YAML fallback when a body advertised as JSON fails to decode (#22)
|
|
12
|
+
- `--version` now derives from installed package metadata instead of a hardcoded literal that had drifted from the real version (#22)
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- Commit `uv.lock` and use `uv sync --locked` in CI for reproducible builds; Dependabot now updates the lockfile via the `uv` ecosystem (#20)
|
|
17
|
+
- Dependency updates: `typer` 0.26 (with test adjustments for its vendored `click`), plus the python-deps and GitHub Actions groups (#21, #19, #16)
|
|
18
|
+
|
|
19
|
+
## [0.5.0] - 2026-04-21
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- `--force-login` flag to bypass cached tokens (#9)
|
|
24
|
+
- Non-interactive `init` flags for scripted profile creation (#9)
|
|
25
|
+
- Security hardening across CLI surfaces (#10)
|
|
26
|
+
- OpenAPI spec composition support (#10)
|
|
27
|
+
- `py.typed` marker for downstream type checkers (#13)
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- SHA-pinned publish workflow and simplified CI (#13)
|
|
32
|
+
- Dependency updates: `rich` (#12), GitHub Actions group (#11)
|
|
33
|
+
|
|
34
|
+
## [0.4.0] - 2026-04-15
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
|
|
38
|
+
- OIDC Device Flow auth type for headless/SSH environments
|
|
39
|
+
- Token exchange and auto-discovery of OIDC endpoints
|
|
40
|
+
- Token injection from environment for CI use cases
|
|
41
|
+
|
|
7
42
|
## [0.3.0] - 2026-03-28
|
|
8
43
|
|
|
9
44
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: openapi-cli4ai
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.1
|
|
4
4
|
Summary: Turn any REST API with an OpenAPI spec into an AI-ready CLI
|
|
5
5
|
Project-URL: Homepage, https://github.com/dbgorilla/openapi-cli4ai
|
|
6
6
|
Project-URL: Repository, https://github.com/dbgorilla/openapi-cli4ai
|
|
@@ -21,7 +21,7 @@ Requires-Python: >=3.11
|
|
|
21
21
|
Requires-Dist: httpx<1,>=0.28
|
|
22
22
|
Requires-Dist: python-dotenv<2,>=1.0
|
|
23
23
|
Requires-Dist: pyyaml<7,>=6
|
|
24
|
-
Requires-Dist: rich<
|
|
24
|
+
Requires-Dist: rich<16,>=13
|
|
25
25
|
Requires-Dist: tomli-w<2,>=1.0
|
|
26
26
|
Requires-Dist: typer<1,>=0.24
|
|
27
27
|
Description-Content-Type: text/markdown
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "openapi-cli4ai"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.5.1"
|
|
8
8
|
description = "Turn any REST API with an OpenAPI spec into an AI-ready CLI"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -26,7 +26,7 @@ classifiers = [
|
|
|
26
26
|
dependencies = [
|
|
27
27
|
"typer>=0.24,<1",
|
|
28
28
|
"httpx>=0.28,<1",
|
|
29
|
-
"rich>=13,<
|
|
29
|
+
"rich>=13,<16",
|
|
30
30
|
"pyyaml>=6,<7",
|
|
31
31
|
"python-dotenv>=1.0,<2",
|
|
32
32
|
"tomli-w>=1.0,<2",
|
|
@@ -40,6 +40,15 @@ Issues = "https://github.com/dbgorilla/openapi-cli4ai/issues"
|
|
|
40
40
|
[project.scripts]
|
|
41
41
|
openapi-cli4ai = "openapi_cli4ai.cli:app"
|
|
42
42
|
|
|
43
|
+
[dependency-groups]
|
|
44
|
+
dev = [
|
|
45
|
+
"pytest>=8",
|
|
46
|
+
"pytest-cov>=5",
|
|
47
|
+
"click>=8,<9",
|
|
48
|
+
"mypy>=1.10,<3",
|
|
49
|
+
"types-PyYAML>=6,<7",
|
|
50
|
+
]
|
|
51
|
+
|
|
43
52
|
[tool.hatch.build.targets.wheel]
|
|
44
53
|
packages = ["src/openapi_cli4ai"]
|
|
45
54
|
|
|
@@ -50,3 +59,17 @@ target-version = "py311"
|
|
|
50
59
|
[tool.pytest.ini_options]
|
|
51
60
|
testpaths = ["tests"]
|
|
52
61
|
markers = ["integration: live API tests (may be slow)"]
|
|
62
|
+
|
|
63
|
+
[tool.mypy]
|
|
64
|
+
python_version = "3.11"
|
|
65
|
+
warn_return_any = false
|
|
66
|
+
warn_unused_configs = true
|
|
67
|
+
disallow_untyped_defs = false
|
|
68
|
+
check_untyped_defs = true
|
|
69
|
+
|
|
70
|
+
[tool.coverage.run]
|
|
71
|
+
source = ["openapi_cli4ai"]
|
|
72
|
+
|
|
73
|
+
[tool.coverage.report]
|
|
74
|
+
show_missing = true
|
|
75
|
+
skip_empty = true
|