Create example of generating a go
client
#14
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.