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

Splitting Positional Route Parameter #1255

Closed
kmacmcfarlane opened this issue Jun 9, 2017 · 0 comments
Closed

Splitting Positional Route Parameter #1255

kmacmcfarlane opened this issue Jun 9, 2017 · 0 comments
Labels

Comments

@kmacmcfarlane
Copy link
Contributor

I have a positional route parameter defined as ArrayOf(String). I want to pass a few ids in one positional parameter. My problem is that the entire comma separated positional parameter is populating the parameter in the controller context as a one-item array, instead of split by commas.

The only thing that's not run-of-the-mill here is the ArrayOf(String) and the fact that the OK response returns an 'application/octet-stream' in order to send a pdf document the action generates.

My goagen tool reports version v1.1.0-dirty

Here is my definition of the action from the design files:
`var _ = Resource("ReadingReport", func(){
BasePath("/readingReport")

Action("download", func() {
	Routing(
		GET("/:patientId/:readingItemIds"),
	)
	Description("Create report from given reading items.")
	Params(func() {
		Param("patientId", String)
		Param("readingItemIds", ArrayOf(String))
	})
	Response(OK, "application/octet-stream")
	Response(NotFound, String)
})

})`

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

No branches or pull requests

2 participants