oapi-codegen
oapi-codegen copied to clipboard
Client code not generated
I am following the readme instructions , and able to generate server code but it does not generate Client code. what I am missing?
If you're able to share your config file you're using that may be helpful.
For instance, this is what I've got:
package: api
generate:
models: true
client: true
output: client.gen.go
I just tested this with and without a config (on v1.11.0
). Without a config (eg. -generate types,server,client,spec
) the command fails to generate client code. Using a config results in client code being generated.
Also, the example config provided in this section of the README needs to be updated. The "generate" section cannot be a list or else the command fails.
And it sounds like the two issues might be related?
README needs to be updated, although I am able to get generate my client by providing these parameters.
go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@latest
oapi-codegen -old-config-style --package=gen --generate=types,client -o ./gen/openapi.gen.go ./openapi.yml``
Somehow it only prints the code to stdout and does not save it to the provided output file...