Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create example of generating a go client #14

Merged
merged 1 commit into from
Aug 28, 2024
Merged

Conversation

laduke
Copy link
Contributor

@laduke laduke commented Aug 28, 2024

I made a go example. Maybe I'll add it to the test suite. Then I'll do rust and js. There's a js example already, in the test suite.

The gist is, put
//go:generate go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen --config=config.yaml https://github.com/zerotier/zerotier-one-api-spec/releases/latest/download/openapi.yaml
in one of your go files and type go generate


There are 100's of generators
https://openapi-generator.tech/docs/generators this is not even the full list of what's out there.

I think we should just publish this spec, and let people use the generator they already like or are forced to use. We can't publish libraries of every language's every generator. There are 11 typescript client generators on that website and it doesn't even include the one we use. I don't know which if any are good.

@laduke laduke merged commit 52aeeb8 into main Aug 28, 2024
1 check passed
@laduke laduke deleted the laduke/examples-go branch August 28, 2024 02:12
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.

2 participants