Skip to content

Commit bf404ce

Browse files
Merge pull request #32 from gpu-cli/codex/adoption-accessibility-hardening
Complete adoption and accessibility hardening
2 parents e695cd8 + a75f3f0 commit bf404ce

101 files changed

Lines changed: 8955 additions & 2158 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.beads/issues.jsonl

Lines changed: 28 additions & 15 deletions
Large diffs are not rendered by default.
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Bug report
2+
description: Report a reproducible generator, CLI, or generated-code problem
3+
title: "[bug]: "
4+
labels: [bug]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for the report. Remove secrets and reduce private specifications to the smallest OpenAPI fragment that still fails.
10+
- type: input
11+
id: version
12+
attributes:
13+
label: Version or commit
14+
description: Output of `openapi-to-rust --version`, or the commit SHA.
15+
placeholder: openapi-to-rust 0.6.0
16+
validations:
17+
required: true
18+
- type: dropdown
19+
id: area
20+
attributes:
21+
label: Affected area
22+
options:
23+
- CLI or configuration
24+
- Generated models
25+
- Generated HTTP client
26+
- Generated SSE client
27+
- Generated Axum server
28+
- Packaging or installation
29+
- Other
30+
validations:
31+
required: true
32+
- type: textarea
33+
id: spec
34+
attributes:
35+
label: Minimal OpenAPI fragment
36+
description: Paste YAML or JSON, or link to a public stable document.
37+
render: yaml
38+
validations:
39+
required: true
40+
- type: textarea
41+
id: config
42+
attributes:
43+
label: Configuration and command
44+
description: Include relevant TOML and the exact command. Redact credentials.
45+
render: shell
46+
validations:
47+
required: true
48+
- type: textarea
49+
id: behavior
50+
attributes:
51+
label: Actual behavior
52+
description: Include the complete error and the relevant generated signature or wire output.
53+
validations:
54+
required: true
55+
- type: textarea
56+
id: expected
57+
attributes:
58+
label: Expected behavior
59+
validations:
60+
required: true
61+
- type: input
62+
id: environment
63+
attributes:
64+
label: Environment
65+
description: OS, `rustc --version`, and installation method.
66+
placeholder: macOS 15; rustc 1.88.0; cargo install --locked
67+
validations:
68+
required: true
69+
- type: checkboxes
70+
id: checks
71+
attributes:
72+
label: Checks
73+
options:
74+
- label: I removed credentials and private API data.
75+
required: true
76+
- label: I searched existing issues for this behavior.
77+
required: true
78+
- label: This is not a security vulnerability.
79+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Usage questions and design discussion
4+
url: https://github.com/gpu-cli/openapi-to-rust/discussions
5+
about: Ask for help or explore an idea before filing a concrete issue.
6+
- name: Private security report
7+
url: https://github.com/gpu-cli/openapi-to-rust/security/advisories/new
8+
about: Report suspected vulnerabilities privately; never include them in a public issue.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Feature request
2+
description: Propose a concrete OpenAPI, generator, or ergonomics improvement
3+
title: "[feature]: "
4+
labels: [enhancement]
5+
body:
6+
- type: textarea
7+
id: use_case
8+
attributes:
9+
label: Use case
10+
description: What are you trying to generate or build, and why is the current output insufficient?
11+
validations:
12+
required: true
13+
- type: dropdown
14+
id: area
15+
attributes:
16+
label: Area
17+
options:
18+
- OpenAPI or JSON Schema support
19+
- Generated models
20+
- Generated HTTP or SSE client
21+
- Generated Axum server
22+
- CLI and configuration
23+
- Packaging, docs, or integrations
24+
validations:
25+
required: true
26+
- type: textarea
27+
id: spec
28+
attributes:
29+
label: Representative OpenAPI fragment
30+
description: Show the smallest wire shape or operation that motivates the request, when applicable.
31+
render: yaml
32+
- type: textarea
33+
id: proposal
34+
attributes:
35+
label: Desired generated API or behavior
36+
description: Include a small Rust sketch when the request changes generated code.
37+
validations:
38+
required: true
39+
- type: textarea
40+
id: alternatives
41+
attributes:
42+
label: Alternatives considered
43+
description: Describe current workarounds and compatibility tradeoffs.
44+
- type: checkboxes
45+
id: compatibility
46+
attributes:
47+
label: Compatibility
48+
options:
49+
- label: I considered whether this changes existing generated Rust APIs or wire behavior.
50+
required: true
51+
- label: I searched existing issues and discussions for this request.
52+
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## Summary
2+
3+
<!-- What user-visible problem does this solve? Link the issue when one exists. -->
4+
5+
## Generated compatibility
6+
7+
<!-- Delete items that do not apply and explain each applicable change. -->
8+
9+
- Generated model or method signatures:
10+
- Query/path/header/body wire behavior:
11+
- Generated runtime dependencies or features:
12+
- Configuration defaults or migrations:
13+
- Remaining unsupported OpenAPI shapes:
14+
15+
## Validation
16+
17+
- [ ] Added or updated a focused fixture and behavioral regression test.
18+
- [ ] Reviewed every changed snapshot; no unrelated churn is included.
19+
- [ ] `cargo fmt --check`
20+
- [ ] `cargo clippy --all-features -- -D warnings`
21+
- [ ] `cargo test --all-features`
22+
- [ ] Ran `scripts/install-smoke.sh` for packaging/dependency changes.
23+
- [ ] Ran a targeted or full `scripts/spec-compile.sh` for generator changes.
24+
- [ ] Updated README, rustdoc, or changelog for user-visible behavior.
25+
26+
## Notes for reviewers
27+
28+
<!-- Call out risk, intentionally deferred work, and the smallest useful review path. -->

.github/workflows/ci.yml

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches: [main]
66
pull_request:
77
branches: [main]
8+
schedule:
9+
- cron: "17 6 * * 1"
10+
workflow_dispatch:
811

912
env:
1013
CARGO_TERM_COLOR: always
@@ -14,9 +17,15 @@ jobs:
1417
runs-on: ubuntu-latest
1518
steps:
1619
- uses: actions/checkout@v4
20+
with:
21+
submodules: true
1722
- uses: dtolnay/rust-toolchain@stable
1823
- uses: Swatinem/rust-cache@v2
1924
- run: cargo test --all-features
25+
- name: Verify checked-in conformance reports
26+
run: |
27+
CONFORMANCE_REPORT=1 cargo test --test conformance --test conformance_json_schema
28+
git diff --exit-code -- tests/conformance/coverage-report.md tests/conformance/json-schema-2020-12-report.md
2029
2130
clippy:
2231
runs-on: ubuntu-latest
@@ -47,21 +56,43 @@ jobs:
4756
env:
4857
RUSTDOCFLAGS: -D warnings
4958

50-
# Regression guard: generate clients for our two production-target specs
51-
# (OpenAI + Anthropic) and `cargo check` the result. Catches breakage
52-
# where a generator change still passes unit tests but emits invalid
53-
# Rust against the specs we actually ship clients for.
54-
#
55-
# The full corpus (54 specs) is verified locally via
56-
# `scripts/spec-compile.sh` (no args) — but cargo-checking 50+
57-
# generated crates exceeded CI's 6-hour job limit on the largest
58-
# specs (microsoft-graph, cloudflare). Local + this CI gate is
59-
# sufficient: regressions to anthropic/openai will fail PRs, and
60-
# contributors can run the full corpus before pushing.
59+
install-smoke:
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
- uses: dtolnay/rust-toolchain@stable
64+
- uses: Swatinem/rust-cache@v2
65+
- run: scripts/install-smoke.sh
66+
67+
msrv:
68+
runs-on: ubuntu-latest
69+
steps:
70+
- uses: actions/checkout@v4
71+
- uses: dtolnay/rust-toolchain@master
72+
with:
73+
toolchain: 1.88.0
74+
- uses: Swatinem/rust-cache@v2
75+
- run: cargo check --all-targets --all-features
76+
77+
# Fast tier: every supported corpus document must generate, while the two
78+
# production-target specs must also compile from their exact dependency
79+
# fragments. The full compile tier runs separately on a schedule/manual run.
6180
spec-compile:
81+
if: github.event_name != 'schedule' && github.event_name != 'workflow_dispatch'
6282
runs-on: ubuntu-latest
6383
steps:
6484
- uses: actions/checkout@v4
6585
- uses: dtolnay/rust-toolchain@stable
6686
- uses: Swatinem/rust-cache@v2
87+
- run: SPEC_COMPILE_PARSE_ONLY=1 scripts/spec-compile.sh
6788
- run: scripts/spec-compile.sh anthropic openai
89+
90+
full-spec-compile:
91+
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
92+
runs-on: ubuntu-latest
93+
timeout-minutes: 240
94+
steps:
95+
- uses: actions/checkout@v4
96+
- uses: dtolnay/rust-toolchain@stable
97+
- uses: Swatinem/rust-cache@v2
98+
- run: scripts/spec-compile.sh

.github/workflows/publish.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,30 @@ env:
88
CARGO_TERM_COLOR: always
99

1010
jobs:
11+
verify:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
submodules: true
17+
- uses: dtolnay/rust-toolchain@stable
18+
with:
19+
components: clippy,rustfmt
20+
- uses: Swatinem/rust-cache@v2
21+
- name: Verify tag matches crate version
22+
run: |
23+
package_version="$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')"
24+
test "${GITHUB_REF_NAME}" = "v${package_version}"
25+
- run: cargo fmt --check
26+
- run: cargo clippy --all-features -- -D warnings
27+
- run: cargo test --all-features
28+
- run: cargo doc --no-deps --all-features
29+
env:
30+
RUSTDOCFLAGS: -D warnings
31+
- run: scripts/install-smoke.sh
32+
1133
publish:
34+
needs: verify
1235
runs-on: ubuntu-latest
1336
environment: crates-io
1437
permissions:
@@ -21,7 +44,7 @@ jobs:
2144
- name: Authenticate with crates.io
2245
id: crates-io-auth
2346
uses: rust-lang/crates-io-auth-action@v1
24-
- run: cargo publish
47+
- run: cargo publish --locked
2548
env:
2649
CARGO_REGISTRY_TOKEN: ${{ steps.crates-io-auth.outputs.token }}
2750
- name: Create GitHub Release

CHANGELOG.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Changelog
2+
3+
All notable changes are recorded here. This project follows semantic versioning,
4+
with one pre-1.0 qualification: a minor release may change generated Rust APIs
5+
when correcting output that was wrong or incomplete on the wire.
6+
7+
## [Unreleased]
8+
9+
### Added
10+
11+
- Direct generation from a local OpenAPI document or bounded HTTPS URL:
12+
`openapi-to-rust generate <SOURCE>`.
13+
- `openapi-to-rust init <SOURCE>`, plus deterministic `--dry-run`, `--check`,
14+
`--quiet`, and `--json` generation modes.
15+
- Optional `[client].operations` selection and model pruning shared with the
16+
server operation scope.
17+
- `Default` for all-optional request models, required-field constructors,
18+
fluent optional setters, and opt-in operation builders.
19+
- A complete `REQUIRED_DEPS.toml` for the exact generated output.
20+
- `base64_url_unpadded` as a spec-wide `format: byte` strategy for RFC 7515
21+
URL-safe, unpadded data.
22+
- Contributor, support, security, conduct, issue-form, and pull-request
23+
scaffolding, plus a docs.rs library overview and compile-checked example.
24+
- The public CLI as Cargo's default binary, so plain `cargo run -- ...` works
25+
even though feature-gated internal maintenance binaries are declared.
26+
27+
### Fixed
28+
29+
- README compatibility, corpus, and conformance claims; pull-request and
30+
scheduled full-corpus CI tiers; and release preflight checks.
31+
- Canonical `[generator.types]` configuration parsing, strict unknown-field
32+
rejection, config-relative paths, and actionable migration errors.
33+
- `cargo install --locked openapi-to-rust` packaging: only the public CLI is
34+
installed, packaged inputs are complete, and obsolete duplicate dependency
35+
versions were removed.
36+
- Server query extraction now mirrors generated client serialization for typed
37+
form, repeated-array, comma-delimited, and deep-object query parameters.
38+
- Generated client requests now support non-JSON bodies, optional bodies,
39+
typed headers, path encoding, and collision-safe operation signatures.
40+
41+
## [0.6.0] - 2026-07-13
42+
43+
### Added
44+
45+
- OpenAPI `style`/`explode`-aware client serialization for object and array
46+
query parameters, including form-exploded objects, comma-joined form values,
47+
deep-object parameters, and repeated arrays.
48+
- Shared-target full-corpus compile tooling in `scripts/spec-compile.sh`.
49+
50+
### Changed
51+
52+
- Regenerated client signatures use typed objects and arrays instead of opaque
53+
`Option<impl AsRef<str>>` arguments for the supported query styles. This is a
54+
source-breaking correction for regenerated pre-1.0 clients.
55+
56+
## [0.5.3] - 2026-07-11
57+
58+
- Added working generated serde codecs for `time::Date` and `time::Time`.
59+
60+
## [0.5.2] - 2026-07-11
61+
62+
- Honored integer and number formats for query and path parameters.
63+
64+
## [0.5.1] - 2026-07-07
65+
66+
- Restricted the crates.io package to the source, manifest, README, and license.
67+
68+
## [0.5.0] - 2026-07-07
69+
70+
### Added
71+
72+
- Opt-in Axum server generation with operation selectors, per-tag traits,
73+
typed response enums, router factories, SSE response support, and model
74+
pruning.
75+
- OpenAPI 3.1 modeling and experimental parsing for selected OpenAPI 3.2
76+
fields and methods.
77+
- Typed scalar strategies, typed `additionalProperties`, operation-level typed
78+
errors, strict extension parsing, webhook ingestion, and SSE auto-detection.
79+
- End-to-end OpenAI Responses and Anthropic Messages server examples.
80+
81+
### Fixed
82+
83+
- Numerous real-spec generation failures involving operation identifiers,
84+
signed enum values, recursive unions, parameter collisions, optional request
85+
bodies, range response codes, and path-segment encoding.
86+
87+
[Unreleased]: https://github.com/gpu-cli/openapi-to-rust/compare/v0.6.0...HEAD
88+
[0.6.0]: https://github.com/gpu-cli/openapi-to-rust/releases/tag/v0.6.0
89+
[0.5.3]: https://github.com/gpu-cli/openapi-to-rust/compare/v0.5.2...v0.5.3
90+
[0.5.2]: https://github.com/gpu-cli/openapi-to-rust/compare/v0.5.1...v0.5.2
91+
[0.5.1]: https://github.com/gpu-cli/openapi-to-rust/compare/v0.5.0...v0.5.1
92+
[0.5.0]: https://github.com/gpu-cli/openapi-to-rust/tree/v0.5.0

0 commit comments

Comments
 (0)