Skip to content

Conversation

chantra
Copy link
Contributor

@chantra chantra commented Apr 4, 2023

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 }
...
...
...

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
Copy link
Contributor Author

chantra commented Jun 5, 2023

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

@chantra
Copy link
Contributor Author

chantra commented Jun 28, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant