Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to have models in Subdirectory? #1428

Closed
chrisabruce opened this issue Feb 21, 2018 · 2 comments
Closed

Possible to have models in Subdirectory? #1428

chrisabruce opened this issue Feb 21, 2018 · 2 comments

Comments

@chrisabruce
Copy link

Problem statement

When passing -m argument as below which includes /, I was hoping that would allow the models to be in a subdirectory:

swagger generate server -A Yabber -f ./api/swagger/swagger.yaml --flag-strategy=pflag -m pkg.models.swagger

However the import statements are snake casing the package name:
...yabber/restapi/operations/accounts/create_account_parameters.go:15:2: cannot find package "github.com/xxx/yabber/pkg_models_swagger"

Please remove the sections that don't apply

Steps to reproduce

  • Generate with -m option containing /

Environment

swagger version: 0.13.0
go version: 1.9.2
OS: OSX

@gregmarr
Copy link
Contributor

This has been fixed in master.

@chrisabruce
Copy link
Author

Great thanks! Just tested and can confirm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants