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

Lexical restrictions on names/ids used in the URI path? #156

Closed
cportele opened this issue Aug 25, 2018 · 5 comments
Closed

Lexical restrictions on names/ids used in the URI path? #156

cportele opened this issue Aug 25, 2018 · 5 comments
Labels
OGC API: Common Issue related to general resources or requirements (see #190) OGC API: Features Issue related to feature resources (see #190) Part 1: Core Issue related to Part 1 - Core progress: pull request available

Comments

@cportele
Copy link
Member

(Moved from a discussion on Gitter)

Should we restrict the lexical space of names/ids used that are used in the URI path? For example the {collectionId} and the {featureId}?

Technically RFC 3986 supports also reserved characters - these have to be percent encoded. But in practice this may cause issues due to different software tools handling this differently. So maybe we should restrict them to the characters that are unreserved in RFC 3986:

unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"

The following characters do not have to be percent encoded and could also be allowed, but maybe this is unnecessary?

"!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" / "@" / ":"

@cportele cportele added the Part 1: Core Issue related to Part 1 - Core label Aug 25, 2018
@cportele cportele added this to the Part 1, Second Draft Release milestone Aug 25, 2018
@aaime
Copy link
Contributor

aaime commented Aug 25, 2018

My 2 cents would be not to place more restrictions compared to general web rules. At the same time, adding an example or a warning in the spec or guide about it could be useful to many.

@cportele
Copy link
Member Author

Maybe a recommendation with an example?

@cmheazel
Copy link
Contributor

The OpenAPI Server Object allows you to specify valid values to use in the URL template for the host. Would a similar capability be useful for Paths? This would allow you to apply restrictions on individual template variables.

@cholmes
Copy link
Member

cholmes commented Aug 31, 2018

I'm in favor of restrictions here - would just do unreserved. Percent encodings can lead to urls that are just not so sensible. @m-mohr just gave an example in gitter of /collections/%E6%BC%A2%E5%AD%97/items (the encoded chars are actually 漢字).

I think server implementations can translate from different inputs to match the rules. I think of 'name' more like 'id' (indeed I'd say we could even consider changing it to id - we do call it {collectionId}).

@cportele cportele added OGC API: Common Issue related to general resources or requirements (see #190) OGC API: Features Issue related to feature resources (see #190) labels Mar 5, 2019
@cportele
Copy link
Member Author

15-April-2019 Teleconference: Do not restrict what is allowed for URIs, but highlight that any reserved character must be percent encoded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OGC API: Common Issue related to general resources or requirements (see #190) OGC API: Features Issue related to feature resources (see #190) Part 1: Core Issue related to Part 1 - Core progress: pull request available
Projects
Development

No branches or pull requests

4 participants