danielgtaylor / openapi-cli-generator

Generate a CLI from an OpenAPI 3 specification
MIT License
179 stars 49 forks source link

Call openapiYmlRegister() instead of openapiRegister() #29

Open Exchizz opened 4 years ago

Exchizz commented 4 years ago

Hi, (Really great tool you've written, thanks)

The readme.md says to call openapiRegister() from main.go, but I have to call openapiYmlRegister() instead.

I don't know if this is a bug or what, but since I'm not fluent in go, it took me some time to track down the issue.

I was getting the following error message:

# command-line-arguments
./main.go:16:9: undefined: openapiRegister
danielgtaylor commented 4 years ago

This looks like a minor bug related to the file extension stripping. Your workaround of using the name with Yml in it should work for now and I'll see if I can add the .yml extension removal code in the near future. Thanks!