Open mdomasevicius opened 7 years ago
What's the reason you use tags[]
as the variable name? We use the declared name in the template and according to the URI template spec, square brackets are not allowed in variable names. That's why the template fails to detect the placeholders in general and then the expansion fails.
Some iOS libraries:
When sending HTTP requests automatically serialize an array of params in this case tags
to tags[]
. Since we did not find any guidelines for REST about conventions regarding such case, decided and agreed with API consumers to leave it like this reasoning it would improve readability.
Given
When:
Then: Link:
http://localhost:8080/deals?page=1&size=1&sort=position,asc{&title,category_id,tags[]}
When: From #535
Then:
Illegal character in query at index 59: http://localhost:8080/deals?page=1&size=1&sort=position,asc{&title,category_id,tags[]}
I tried expanding links in the same manner like
http://localhost:8080/deals{/id}
and it works resulting inhttp://localhost:8080/deals
but not with template being after URL request params