danielgtaylor / openapi-cli-generator

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

openapi-cli-generator init <app-name> not working MacOS #22

Closed dhavalgogri17 closed 4 years ago

dhavalgogri17 commented 5 years ago

I successfully installed go and then used the "go get -u github.com/danielgtaylor/openapi-cli-generator" you gave. But the init command doesn't work. Gives me the following error on MacOS Terminal: -bash: openapi-cli-generator: command not found

falzm commented 4 years ago

@dhavalgogri17 if you haven't set a GOPATH environment variable, the go get ... command mentioned in the documentation has probably created a go/ directory in your current user home directory. The openapi-cli-generator binary should be located in ~/go/bin/openapi-cli-generator ; you should add something like this in your shell configuration (I'm assuming you're running Bash):

export PATH="${PATH}:${HOME}/go/bin"
danielgtaylor commented 4 years ago

I believe @falzm's comment shows you how to fix your issue, so I'm going to close this. Please re-open if needed!