openapi-cli4ai 0.5.0__tar.gz → 0.6.0__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.6.0/.github/CODEOWNERS +7 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/.github/dependabot.yml +1 -1
- openapi_cli4ai-0.6.0/.github/pull_request_template.md +22 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/.github/workflows/ci.yml +12 -10
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/.github/workflows/codeql.yml +3 -3
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/.github/workflows/publish.yml +4 -4
- openapi_cli4ai-0.6.0/.github/workflows/validate-profiles.yml +24 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/CHANGELOG.md +29 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/CONTRIBUTING.md +17 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/PKG-INFO +2 -1
- openapi_cli4ai-0.6.0/profiles/README.md +75 -0
- openapi_cli4ai-0.6.0/profiles/community/.gitkeep +2 -0
- openapi_cli4ai-0.6.0/profiles/community/xquik.toml +11 -0
- openapi_cli4ai-0.6.0/profiles/verified/petstore.toml +11 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/pyproject.toml +13 -2
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/src/openapi_cli4ai/cli.py +453 -13
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/test_auth.py +1 -1
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/test_auth_flow_security.py +2 -2
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/test_auth_flows.py +1 -1
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/test_caching.py +78 -0
- openapi_cli4ai-0.6.0/tests/test_catalog.py +313 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/test_commands.py +6 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/test_coverage_gaps.py +1 -1
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/test_device_flow.py +1 -1
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/test_error_handling.py +3 -3
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/test_oidc.py +1 -1
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/test_security.py +7 -7
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/test_v040_hardening.py +3 -3
- openapi_cli4ai-0.6.0/uv.lock +743 -0
- openapi_cli4ai-0.5.0/.github/CODEOWNERS +0 -2
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/.github/release.yml +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/.gitignore +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/.pre-commit-config.yaml +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/LICENSE +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/README.md +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/SECURITY.md +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/demo.gif +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/examples/profiles.toml.example +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/openapi-cli4ai +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/src/openapi_cli4ai/__init__.py +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/src/openapi_cli4ai/__main__.py +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/src/openapi_cli4ai/py.typed +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/__init__.py +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/conftest.py +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/fixtures/petstore_spec.json +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/test_cli_commands.py +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/test_features.py +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/test_foundation.py +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/test_integration.py +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/test_profile_management.py +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/test_run_command.py +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/test_schema_composition.py +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/test_spec_parsing.py +0 -0
- {openapi_cli4ai-0.5.0 → openapi_cli4ai-0.6.0}/tests/test_sse_streaming.py +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Default: all PRs require review from a maintainer
|
|
2
|
+
* @dbgorilla/maintainers
|
|
3
|
+
|
|
4
|
+
# Catalog profiles. Both tiers require maintainer approval for now; the
|
|
5
|
+
# community tier can later point at a broader reviewer team.
|
|
6
|
+
/profiles/verified/ @dbgorilla/maintainers
|
|
7
|
+
/profiles/community/ @dbgorilla/maintainers
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!-- Thanks for contributing! Describe your change below. -->
|
|
2
|
+
|
|
3
|
+
## What & why
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- ▼ Delete this whole section if you are NOT adding a catalog profile ▼ -->
|
|
10
|
+
|
|
11
|
+
### Adding a catalog profile — please confirm
|
|
12
|
+
|
|
13
|
+
- [ ] The profile is for a **publicly accessible** API with a stable OpenAPI spec.
|
|
14
|
+
- [ ] I am the API owner, or have the owner's permission.
|
|
15
|
+
- [ ] `source` is the API's **own** developer/docs URL (same registrable domain as `base_url`).
|
|
16
|
+
- [ ] No secrets are inlined — credentials are referenced via `*_env_var` fields only.
|
|
17
|
+
- [ ] `description` is factual (no marketing copy).
|
|
18
|
+
- [ ] I ran `uv run openapi-cli4ai catalog validate profiles/community/<slug>.toml` locally and it passed.
|
|
19
|
+
|
|
20
|
+
> **Reviewer:** independently verify that `base_url` resolves to the claimed
|
|
21
|
+
> service (typosquats and look-alike domains are the main risk), and that the
|
|
22
|
+
> auth shape can't leak a credential to an unexpected host.
|
|
@@ -16,33 +16,35 @@ jobs:
|
|
|
16
16
|
matrix:
|
|
17
17
|
python-version: ["3.11", "3.12", "3.13"]
|
|
18
18
|
steps:
|
|
19
|
-
- uses: actions/checkout@
|
|
20
|
-
- uses: astral-sh/setup-uv@
|
|
19
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
20
|
+
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
|
|
21
21
|
with:
|
|
22
22
|
enable-cache: true
|
|
23
23
|
- name: Set up Python ${{ matrix.python-version }}
|
|
24
24
|
run: uv python install ${{ matrix.python-version }}
|
|
25
25
|
- name: Sync dependencies
|
|
26
|
-
run: uv sync --python ${{ matrix.python-version }}
|
|
26
|
+
run: uv sync --locked --python ${{ matrix.python-version }}
|
|
27
27
|
- name: Run unit tests with coverage
|
|
28
28
|
run: uv run --python ${{ matrix.python-version }} pytest tests/ -m "not integration" -v --cov=openapi_cli4ai --cov-report=term-missing
|
|
29
29
|
|
|
30
30
|
lint:
|
|
31
31
|
runs-on: ubuntu-latest
|
|
32
32
|
steps:
|
|
33
|
-
- uses: actions/checkout@
|
|
34
|
-
- uses: astral-sh/setup-uv@
|
|
33
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
34
|
+
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
|
|
35
|
+
- name: Sync dependencies
|
|
36
|
+
run: uv sync --locked
|
|
35
37
|
- name: Ruff check
|
|
36
|
-
run:
|
|
38
|
+
run: uv run ruff check .
|
|
37
39
|
- name: Ruff format check
|
|
38
|
-
run:
|
|
40
|
+
run: uv run ruff format --check .
|
|
39
41
|
|
|
40
42
|
typecheck:
|
|
41
43
|
runs-on: ubuntu-latest
|
|
42
44
|
steps:
|
|
43
|
-
- uses: actions/checkout@
|
|
44
|
-
- uses: astral-sh/setup-uv@
|
|
45
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
46
|
+
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
|
|
45
47
|
- name: Sync dependencies
|
|
46
|
-
run: uv sync
|
|
48
|
+
run: uv sync --locked
|
|
47
49
|
- name: Run mypy
|
|
48
50
|
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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
20
|
+
- uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
|
|
21
21
|
with:
|
|
22
22
|
languages: python
|
|
23
|
-
- uses: github/codeql-action/analyze@
|
|
23
|
+
- uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
|
|
@@ -13,8 +13,8 @@ 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
17
|
+
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
|
|
18
18
|
- name: Build sdist and wheel
|
|
19
19
|
run: uv build
|
|
20
20
|
- name: Upload artifacts
|
|
@@ -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@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Validate profiles
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- "profiles/**"
|
|
8
|
+
- ".github/workflows/validate-profiles.yml"
|
|
9
|
+
pull_request:
|
|
10
|
+
paths:
|
|
11
|
+
- "profiles/**"
|
|
12
|
+
- ".github/workflows/validate-profiles.yml"
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
validate:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
22
|
+
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
|
|
23
|
+
- name: Validate catalog profiles
|
|
24
|
+
run: uv run --locked openapi-cli4ai catalog validate --all
|
|
@@ -4,6 +4,35 @@ 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.6.0] - 2026-07-31
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Profile catalog** — browse and install ready-made API profiles: `catalog search` / `show` / `list` / `install` / `validate`. Bundled into the wheel, so it works offline, with two trust tiers (`verified` / `community`) (#25)
|
|
12
|
+
- Global `--profile` / `-p` flag to select a profile for a single invocation (precedence: flag > `OAC_PROFILE` > active profile) (#25)
|
|
13
|
+
- Community-contributed profile: Xquik (#23)
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Dependency updates: `typer` 0.27, `mypy` 2.3, `types-PyYAML`, and the GitHub Actions group (#38, #37)
|
|
18
|
+
- Pin `ruff` and run the locked version in CI so lint is deterministic (no more `uvx`-latest drift) (#39)
|
|
19
|
+
|
|
20
|
+
### Security
|
|
21
|
+
|
|
22
|
+
- Catalog validation hardening: SSRF guard on spec fetches (rejects cloud-metadata/private/loopback hosts, pre- and post-redirect), Public Suffix List domain-ownership check, spec size/redirect/timeout limits, prompt-injection scan of descriptions, and an explicit confirmation before installing unverified community profiles (#25)
|
|
23
|
+
|
|
24
|
+
## [0.5.1] - 2026-07-04
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- 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)
|
|
29
|
+
- `--version` now derives from installed package metadata instead of a hardcoded literal that had drifted from the real version (#22)
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- Commit `uv.lock` and use `uv sync --locked` in CI for reproducible builds; Dependabot now updates the lockfile via the `uv` ecosystem (#20)
|
|
34
|
+
- Dependency updates: `typer` 0.26 (with test adjustments for its vendored `click`), plus the python-deps and GitHub Actions groups (#21, #19, #16)
|
|
35
|
+
|
|
7
36
|
## [0.5.0] - 2026-04-21
|
|
8
37
|
|
|
9
38
|
### Added
|
|
@@ -37,6 +37,23 @@ pytest tests/ -m "not integration" -v
|
|
|
37
37
|
4. Commit with a clear message
|
|
38
38
|
5. Push and open a PR
|
|
39
39
|
|
|
40
|
+
## Contributing a Profile to the Catalog
|
|
41
|
+
|
|
42
|
+
`openapi-cli4ai` ships a community catalog of ready-made API profiles under
|
|
43
|
+
[`profiles/`](profiles/README.md). To add one:
|
|
44
|
+
|
|
45
|
+
1. Create `profiles/community/<slug>.toml` following the format in
|
|
46
|
+
[`profiles/README.md`](profiles/README.md).
|
|
47
|
+
2. Reference secrets only via `*_env_var` fields — never commit a token.
|
|
48
|
+
3. Keep the `description` factual. `source` must be the API's own developer or
|
|
49
|
+
docs URL (same domain as `base_url`).
|
|
50
|
+
4. Validate locally: `uv run openapi-cli4ai catalog validate profiles/community/<slug>.toml`
|
|
51
|
+
|
|
52
|
+
CI runs `catalog validate --all` on every PR touching `profiles/`, checking the
|
|
53
|
+
fields, a live spec fetch, ownership, and absence of inline secrets — errors
|
|
54
|
+
appear inline on the PR. Profiles that are primarily promotional will be closed
|
|
55
|
+
without review.
|
|
56
|
+
|
|
40
57
|
## Reporting Issues
|
|
41
58
|
|
|
42
59
|
Open an issue on GitHub. Include:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: openapi-cli4ai
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
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
|
|
@@ -19,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
19
19
|
Classifier: Topic :: Software Development :: Libraries
|
|
20
20
|
Requires-Python: >=3.11
|
|
21
21
|
Requires-Dist: httpx<1,>=0.28
|
|
22
|
+
Requires-Dist: publicsuffix2<3,>=2.2
|
|
22
23
|
Requires-Dist: python-dotenv<2,>=1.0
|
|
23
24
|
Requires-Dist: pyyaml<7,>=6
|
|
24
25
|
Requires-Dist: rich<16,>=13
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Profile catalog
|
|
2
|
+
|
|
3
|
+
Ready-made **profiles** for public APIs. A profile is the small bit of config
|
|
4
|
+
`openapi-cli4ai` needs to talk to an API: a base URL, where its OpenAPI spec
|
|
5
|
+
lives, and how it authenticates. The catalog is bundled into the package, so
|
|
6
|
+
these commands work offline:
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
openapi-cli4ai catalog search cov # find profiles
|
|
10
|
+
openapi-cli4ai catalog show codecov # preview one
|
|
11
|
+
openapi-cli4ai catalog install codecov # add it to your config, with next steps
|
|
12
|
+
openapi-cli4ai --profile codecov endpoints # use it (no activation needed)
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
`install` maps the catalog entry into your `~/.openapi-cli4ai.toml`, tells you
|
|
16
|
+
exactly which environment variable to set for auth, and hands you the next
|
|
17
|
+
command — no docs required.
|
|
18
|
+
|
|
19
|
+
## Tiers
|
|
20
|
+
|
|
21
|
+
Listing a profile here is not an endorsement of the product behind it. Trust is
|
|
22
|
+
a **tier**, shown next to every entry, not a gate on being listed.
|
|
23
|
+
|
|
24
|
+
| Tier | Directory | What it means |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| **Verified** | `verified/` | A maintainer confirmed the spec loads and the auth flow works. |
|
|
27
|
+
| **Community** | `community/` | Contributed via PR and passed automated validation. Not manually vetted. |
|
|
28
|
+
|
|
29
|
+
New submissions go to `community/`; a maintainer may promote a profile to
|
|
30
|
+
`verified/` after checking it end to end. Installing a **community** profile
|
|
31
|
+
prompts for confirmation (it shows the `base_url` your credentials would be
|
|
32
|
+
sent to); **verified** profiles install without a prompt. Use `--yes` to skip
|
|
33
|
+
the prompt in scripts.
|
|
34
|
+
|
|
35
|
+
## Profile format
|
|
36
|
+
|
|
37
|
+
One profile per file, named `<slug>.toml`:
|
|
38
|
+
|
|
39
|
+
```toml
|
|
40
|
+
name = "example" # must match the file name
|
|
41
|
+
description = "Example REST API" # one factual line, no marketing
|
|
42
|
+
maintainer = "your-github-username"
|
|
43
|
+
source = "https://example.com/docs" # the API's official docs (same domain as base_url)
|
|
44
|
+
|
|
45
|
+
base_url = "https://api.example.com"
|
|
46
|
+
openapi_url = "https://api.example.com/openapi.json" # or: openapi_path = "/openapi.json"
|
|
47
|
+
|
|
48
|
+
[auth]
|
|
49
|
+
type = "api-key" # none | bearer | oidc | device | api-key | basic
|
|
50
|
+
env_var = "EXAMPLE_API_KEY" # reference secrets by env var — never inline them
|
|
51
|
+
header = "x-api-key"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Auth field names match the CLI's runtime config; see
|
|
55
|
+
[`../examples/profiles.toml.example`](../examples/profiles.toml.example) for
|
|
56
|
+
each auth type.
|
|
57
|
+
|
|
58
|
+
## Contributing a profile
|
|
59
|
+
|
|
60
|
+
1. Create `community/<slug>.toml` in the format above.
|
|
61
|
+
2. Reference secrets only via `*_env_var` fields — **never commit a token**.
|
|
62
|
+
3. Keep `description` factual. `source` must be the API's own developer/docs
|
|
63
|
+
URL (same registrable domain as `base_url`).
|
|
64
|
+
|
|
65
|
+
Validate before opening the PR — the CLI is the single source of truth:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
uv run openapi-cli4ai catalog validate profiles/community/<slug>.toml
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
CI runs `catalog validate --all` on every PR touching `profiles/`. It checks the
|
|
72
|
+
fields and (Public Suffix List-based) domain ownership, fetches the OpenAPI spec
|
|
73
|
+
behind SSRF guards with size/redirect/timeout limits, rejects inlined secrets,
|
|
74
|
+
and flags prompt-injection markers in the description. Errors are posted inline
|
|
75
|
+
on the PR.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
name = "xquik"
|
|
2
|
+
description = "Xquik REST API"
|
|
3
|
+
maintainer = "kriptoburak"
|
|
4
|
+
source = "https://xquik.com"
|
|
5
|
+
base_url = "https://xquik.com"
|
|
6
|
+
openapi_url = "https://xquik.com/openapi.json"
|
|
7
|
+
|
|
8
|
+
[auth]
|
|
9
|
+
type = "api-key"
|
|
10
|
+
env_var = "XQUIK_API_KEY"
|
|
11
|
+
header = "x-api-key"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Verified catalog profile. Validated by a maintainer against a live spec.
|
|
2
|
+
name = "petstore"
|
|
3
|
+
description = "Swagger Petstore — the OpenAPI 3 sample API"
|
|
4
|
+
maintainer = "dbgorilla"
|
|
5
|
+
source = "https://petstore3.swagger.io"
|
|
6
|
+
|
|
7
|
+
base_url = "https://petstore3.swagger.io/api/v3"
|
|
8
|
+
openapi_url = "https://petstore3.swagger.io/api/v3/openapi.json"
|
|
9
|
+
|
|
10
|
+
[auth]
|
|
11
|
+
type = "none"
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "openapi-cli4ai"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.6.0"
|
|
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"
|
|
@@ -30,6 +30,7 @@ dependencies = [
|
|
|
30
30
|
"pyyaml>=6,<7",
|
|
31
31
|
"python-dotenv>=1.0,<2",
|
|
32
32
|
"tomli-w>=1.0,<2",
|
|
33
|
+
"publicsuffix2>=2.2,<3",
|
|
33
34
|
]
|
|
34
35
|
|
|
35
36
|
[project.urls]
|
|
@@ -44,13 +45,23 @@ openapi-cli4ai = "openapi_cli4ai.cli:app"
|
|
|
44
45
|
dev = [
|
|
45
46
|
"pytest>=8",
|
|
46
47
|
"pytest-cov>=5",
|
|
47
|
-
"
|
|
48
|
+
"click>=8,<9",
|
|
49
|
+
# ruff pinned <0.16: 0.16 stabilized RUF059 (and others) that flag ~450
|
|
50
|
+
# existing lines. CI runs the locked ruff (uv run) instead of uvx-latest so
|
|
51
|
+
# lint is deterministic; a future bump comes via Dependabot and is gated by CI.
|
|
52
|
+
"ruff>=0.15,<0.16",
|
|
53
|
+
"mypy>=1.10,<3",
|
|
48
54
|
"types-PyYAML>=6,<7",
|
|
49
55
|
]
|
|
50
56
|
|
|
51
57
|
[tool.hatch.build.targets.wheel]
|
|
52
58
|
packages = ["src/openapi_cli4ai"]
|
|
53
59
|
|
|
60
|
+
# Bundle the profile catalog into the wheel so `catalog` commands work offline.
|
|
61
|
+
[tool.hatch.build.targets.wheel.force-include]
|
|
62
|
+
"profiles/verified" = "openapi_cli4ai/_catalog/verified"
|
|
63
|
+
"profiles/community" = "openapi_cli4ai/_catalog/community"
|
|
64
|
+
|
|
54
65
|
[tool.ruff]
|
|
55
66
|
line-length = 120
|
|
56
67
|
target-version = "py311"
|