We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Using an array type as ressource id leads to invalid generated code.
func ({{ .ReceiverName }} *{{ pascalize .Name }}URL) Build() (*url.URL, error) in \templates\server\urlbuilder.gotmpl
expects that {{ varname .ID }} is a string, but {{ .Formatter }} does not work for arrays.
Please remove the sections that don't apply
paths: /resource/{resource}/{IDs}: get: ...
parameters: IDs: name: IDs in: path description: A singele object ID or a comma seperated list of objects IDs. type: array items: type: string collectionFormat: csv minItems: 1 uniqueItems: true required: true
generate go code with an array type as ressource id
swagger version: commit/278bee9f9204f7941f11df84fe6f09dded3bdb19 go version: 1.9 OS: any
The text was updated successfully, but these errors were encountered:
Should be fixed with PR #1394. To be tested again.
Sorry, something went wrong.
Acknowledge corrected issues with test cases
bf865a1
* fixes go-swagger#866 - acknowledge flatten works fine * fixes go-swagger#946 - acknowledge JSON marshal and validation * fixes go-swagger#1314 - add fixture to CI codegen testing * fixes go-swagger#1013 - acknowledge fixed * fixes go-swagger#1062 - added fixture to CI codegen test * fixes go-swagger#1237 - acknowledge validation in body
fredbi
Successfully merging a pull request may close this issue.
Problem statement
Using an array type as ressource id leads to invalid generated code.
func ({{ .ReceiverName }} *{{ pascalize .Name }}URL) Build() (*url.URL, error)
in
\templates\server\urlbuilder.gotmpl
expects that {{ varname .ID }} is a string, but {{ .Formatter }} does not work for arrays.
Please remove the sections that don't apply
Swagger specification
paths:
/resource/{resource}/{IDs}:
get:
...
parameters:
IDs:
name: IDs
in: path
description: A singele object ID or a comma seperated list of objects IDs.
type: array
items:
type: string
collectionFormat: csv
minItems: 1
uniqueItems: true
required: true
Steps to reproduce
generate go code with an array type as ressource id
Environment
swagger version: commit/278bee9f9204f7941f11df84fe6f09dded3bdb19
go version: 1.9
OS: any
The text was updated successfully, but these errors were encountered: