Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

URI Query Parameter names starting with "$" won't parse #125

Closed
vzwick opened this issue Jul 1, 2014 · 7 comments
Closed

URI Query Parameter names starting with "$" won't parse #125

vzwick opened this issue Jul 1, 2014 · 7 comments

Comments

@vzwick
Copy link

vzwick commented Jul 1, 2014

## SomeResource [/SomeResource{?$top}]

### SomeOperation [GET]

+ Parameters

    + $top = `15` (optional, int, `30`) ... The amount of rows to return.

throws a parse error:

Ignoring unrecognized list, expected parameter discussion, e.g. ' ... lorem ipsum'.

@vzwick
Copy link
Author

vzwick commented Jul 1, 2014

It seems like this is closely related to #90

@zdne
Copy link
Contributor

zdne commented Jul 1, 2014

@vzwick

It seems like this is closely related to #90

Yes. However note $ is not allowed character for a variable name according to RFC6570 – http://tools.ietf.org/html/rfc6570#section-2.3

May I ask you where is this being used?

@vzwick
Copy link
Author

vzwick commented Jul 1, 2014

@zdne - sure. The culprit is OData, where query string variables like $top, $skip and $filter were obviously considered a good idea.

Unfortunately, OData is baked into the ASP.NET Web API, so pretty much everyone stuck on the Microsoft ASP stack will be facing the same problem as I do.

@zdne
Copy link
Contributor

zdne commented Jul 1, 2014

Thanks!

Given the $ is unacceptable character in URI Template variable – what would be the best acceptable solution for you?

Is pct-encoding in the variable name in the URI Template bearable?

@vzwick
Copy link
Author

vzwick commented Jul 1, 2014

@zdne yes, of course.

@zdne zdne modified the milestones: URI Parameter Identifiers, URI Parameters Fixes Jul 8, 2014
@zdne zdne added bug and removed improvement labels Jul 9, 2014
@zdne
Copy link
Contributor

zdne commented Jul 9, 2014

This is also related (duplicate) to #107

@zdne
Copy link
Contributor

zdne commented Jul 24, 2014

Please track this issue at #107

@zdne zdne closed this as completed Jul 24, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants