oxidecomputer / third-party-api-clients

A place for keeping all our generated third party API clients.
https://docs.rs/octorust
MIT License
132 stars 55 forks source link

[github][spec] apply patch from 41a997b when syncing spec #66

Open chantra opened 1 year ago

chantra commented 1 year ago

Test:

$ make github
cargo build --bin generator
    Updating crates.io index
   Compiling generator v0.0.0 (/home/chantra/devel/oxidecomputer-third-party-api-clients/generator)
    Finished dev [unoptimized + debuginfo] target(s) in 27.55s
curl -sSL https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json -o /home/chantra/devel/oxidecomputer-third-party-api-clients/specs/github/api.github.com.json
patch -f -p1 < specs/patches/github/*patch
patching file specs/github/api.github.com.json
Hunk #1 succeeded at 290837 with fuzz 1 (offset 195370 lines).
./target/debug/generator -i /home/chantra/devel/oxidecomputer-third-party-api-clients/specs/github/api.github.com.json -v 0.3.2 \
    -o github \
    -n octorust \
    --proper-name GitHub \
    -d "A fully generated & opinionated API client for the GitHub API." \
    --spec-link "https://github.com/github/rest-api-description" \
    --host "api.github.com"
Only default server urls are supported. Variables are not configurable
component responses not supported
component parameters not supported
component headers not supported
op repos/upload-release-asset: servers are only partially supported. Variables are not supported
[warn] got ANY kind: Some("dismissed_at") code scanning alert created event AnySchema { typ: None, pattern: None, multiple_of: None, exclusive_minimum: None, exclusive_maximum: None, minimum: None, maximum: None, properties: {}, required: [], additional_properties: None, min_properties: None, max_properties: None, items: None, min_items: None, max_items: None, unique_items: None, enumeration: [], format: None, min_length: None, max_length: None, one_of: [], all_of: [], any_of: [], not: None }
...
...
...
chantra commented 1 year ago

@augustuswm any interest in this? It would help ensuring that the spec does not regress over time.

chantra commented 1 year ago

@augustuswm do you think something like this would be useful to ensure there is no regression of the spec?