-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Can't have server code in subdirectory #1624
Labels
Comments
The generated code is put in a hierarchy of packages which may be customized with the -a, --api-package= the package to save the operations (default: operations)
-m, --model-package= the package to save the models (default: models)
-s, --server-package= the package to save the server specific code (default: restapi)
-c, --client-package= the package to save the client specific code (default: client)
-t, --target= the base directory for generating the files (default: ./) The organization is determined as follows:
You may customize the folder names, but can't specify sub-packages as package names. |
We fixed this issue for models in December: #1326 |
Commit is here ae57fbc |
MrLuje
added a commit
to MrLuje/go-swagger
that referenced
this issue
Nov 9, 2018
MrLuje
added a commit
to MrLuje/go-swagger
that referenced
this issue
Nov 9, 2018
MrLuje
added a commit
to MrLuje/go-swagger
that referenced
this issue
Nov 9, 2018
Fixes go-swagger#1624 Signed-off-by: Vincent De Oliveira <ogmniluje@gmail.com>
MrLuje
added a commit
to MrLuje/go-swagger
that referenced
this issue
Nov 9, 2018
Signed-off-by: Vincent De Oliveira <ogmniluje@gmail.com>
fredbi
added a commit
to fredbi/go-swagger
that referenced
this issue
Nov 17, 2018
Makes generation functional and consistent regarding: * dashes in names * reserved suffixes, which are meaningful for go, like 'test' * sub-directories specified as target names (e.g. 'api/subdir') * packages for client, model and server * fixes go-swagger#1683 * fixes go-swagger#1157 * fixes go-swagger#1624 Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi
added a commit
to fredbi/go-swagger
that referenced
this issue
Nov 17, 2018
Makes generation functional and consistent regarding: * dashes in names * reserved suffixes, which are meaningful for go, like 'test' * sub-directories specified as target names (e.g. 'api/subdir') * packages for client, model and server * fixes go-swagger#1683 * fixes go-swagger#1157 * fixes go-swagger#1624 Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi
added a commit
to fredbi/go-swagger
that referenced
this issue
Nov 18, 2018
Makes generation functional and consistent regarding: * dashes in names * reserved suffixes, which are meaningful for go, like 'test' * sub-directories specified as target names (e.g. 'api/subdir') * packages for client, model and server * fixes go-swagger#1683 * fixes go-swagger#1157 * fixes go-swagger#1624 * replaces go-swagger#1790 Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi
added a commit
to fredbi/go-swagger
that referenced
this issue
Nov 18, 2018
Makes generation functional and consistent regarding: * dashes in names * reserved suffixes, which are meaningful for go, like 'test' * sub-directories specified as target names (e.g. 'api/subdir') * packages for client, model and server * fixes go-swagger#1683 * fixes go-swagger#1157 * fixes go-swagger#1624 * replaces go-swagger#1790 Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem statement
When passing -s argument as below which includes /, I was hoping that would allow the server code to be in a subdirectory:
swagger generate server -f ./api/swagger/swagger.yaml -s pkg/srv
However the import statements, for example in
configure_srv.go
are snake casing the package name:"github.com/xxx/app/pkg_srv/operations"
Swagger specification
2.0
Environment
swagger version: 0.15.0
go version: 1.10.3
OS: OS-X
The text was updated successfully, but these errors were encountered: