zerotier / zerotier-one-api-spec

ZeroTier
https://zerotier.com
3 stars 0 forks source link

Create example of generating a `go` client #14

Closed laduke closed 2 months ago

laduke commented 2 months ago

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.