-
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
Swagger tags starting with integer make formatting errors in operations #2111
Labels
Comments
fredbi
added a commit
to fredbi/go-swagger
that referenced
this issue
Jan 16, 2020
* removed redundant code generation code regarding imports (and let goimport sort it out) * refactored imports in templates: imports are maps, codegen uses a language-specific funcmap * mangle tag-based package names to safe names and use package aliasing * introduced CLI option to disable tag-based package generation for operations * introduced CLI option to override main server package location * introduced x-go-operation-tag to alter tag-based package generation * made global tag definition honor the x-go-name tag to alter tag-based package generation Issues fixes: * fixes go-swagger#1049 (tag override) * fixes go-swagger#2111 (tag mangling) * fixes go-swagger#2057 (tag mangling) * fixes go-swagger#1291 (tag mangling) * fixes go-swagger#1971 (main package mangling & override) TODO: name aliasing for imported models Signed-off-by: Frederic BIDON <fredbi@yahoo.com> sets our target for generator refactoring Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi
added a commit
to fredbi/go-swagger
that referenced
this issue
Jan 26, 2020
* removed redundant code generation code regarding imports (and let goimport sort it out) * refactored imports in templates: imports are maps, codegen uses a language-specific funcmap * mangle tag-based package names to safe names and use package aliasing * introduced CLI option to disable tag-based package generation for operations * introduced CLI option to override main server package location * introduced x-go-operation-tag to alter tag-based package generation * made global tag definition honor the x-go-name tag to alter tag-based package generation * propagated changes to stratoscale contrib templates Issues fixes: * fixes go-swagger#1049 (tag override) * fixes go-swagger#2111 (tag mangling) * fixes go-swagger#2057 (tag mangling) * fixes go-swagger#1291 (tag mangling) * fixes go-swagger#1971 (main package mangling & main target override) TODO: name aliasing and mangling for imported models remains to be done Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi
added a commit
to fredbi/go-swagger
that referenced
this issue
Jan 26, 2020
* removed redundant code generation code regarding imports (and let goimport sort it out) * refactored imports in templates: imports are maps, codegen uses a language-specific funcmap * mangle tag-based package names to safe names and use package aliasing * introduced CLI option to disable tag-based package generation for operations * introduced CLI option to override main server package location * introduced x-go-operation-tag to alter tag-based package generation * made global tag definition honor the x-go-name tag to alter tag-based package generation * propagated changes to stratoscale contrib templates Issues fixes: * fixes go-swagger#1049 (tag override) * fixes go-swagger#2111 (tag mangling) * fixes go-swagger#2057 (tag mangling) * fixes go-swagger#1291 (tag mangling) * fixes go-swagger#1971 (main package mangling & main target override) TODO: name aliasing and mangling for imported models remains to be done Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi
added a commit
to fredbi/go-swagger
that referenced
this issue
Jan 26, 2020
* removed redundant code generation code regarding imports (and let goimport sort it out) * refactored imports in templates: imports are maps, codegen uses a language-specific funcmap * mangle tag-based package names to safe names and use package aliasing * introduced CLI option to disable tag-based package generation for operations * introduced CLI option to override main server package location * introduced x-go-operation-tag to alter tag-based package generation * made global tag definition honor the x-go-name tag to alter tag-based package generation * propagated changes to stratoscale contrib templates Issues fixes: * fixes go-swagger#1049 (tag override) * fixes go-swagger#2111 (tag mangling) * fixes go-swagger#2057 (tag mangling) * fixes go-swagger#1291 (tag mangling) * fixes go-swagger#1971 (main package mangling & main target override) TODO: name aliasing and mangling for imported models remains to be done Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi
added a commit
that referenced
this issue
Jan 26, 2020
* Review of codegen imports and package name mangling * removed redundant code generation code regarding imports (and let goimport sort it out) * refactored imports in templates: imports are maps, codegen uses a language-specific funcmap * mangle tag-based package names to safe names and use package aliasing * introduced CLI option to disable tag-based package generation for operations * introduced CLI option to override main server package location * introduced x-go-operation-tag to alter tag-based package generation * made global tag definition honor the x-go-name tag to alter tag-based package generation * propagated changes to stratoscale contrib templates Issues fixes: * fixes #1049 (tag override) * fixes #2111 (tag mangling) * fixes #2057 (tag mangling) * fixes #1291 (tag mangling) * fixes #1971 (main package mangling & main target override) TODO: name aliasing and mangling for imported models remains to be done Signed-off-by: Frederic BIDON <fredbi@yahoo.com> * fixup some linting after refactoring Signed-off-by: Frederic BIDON <fredbi@yahoo.com> * fixup server doc 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
Hi guys,
go-swagger has an issue to create operations from the swagger configuration if the path contains the first tag starting with an integer.
Sample swagger:
Sample error:
I would like to keep this error here, as the output is not clear about the root cause.
Temporary solution:
Environment
swagger version: 0.21.0
go version: 1.13.4
OS: Windows
The text was updated successfully, but these errors were encountered: