[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] (ODATA-799) Define Key-As-Segment URL convention for resource paths
[ https://issues.oasis-open.org/browse/ODATA-799?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ralf Handl updated ODATA-799:
-----------------------------
Description:
Typical web APIs use path segments for key access to collection elements:
~/Users
~/Users/42
Specify how such a URL convention would look like, considering
- multi-part keys
- the Edm primitive type system
- bound actions/functions on entity-set level
- context URLs for contained entities which include the key
- relative context URLs
Consider notation that allows context URLs to be relative to the service root.
was:
Typical web APIs use path segments for key access to collection elements:
~/Users
~/Users/42
Specify how such a URL convention would look like, considering
- multi-part keys
- the Edm primitive type system
- bound actions/functions on entity-set level
Proposal:
Key-as-Segment uses the (primary) key of an entity type. The number and sequence of <PropertyRef> elements within the <Key> defines the number and sequence of path segments that have to be attached to the path of the collection to identify an item in a collection.
Primitive types are represented in path key segments without "single quote decoration" or "double single quotes within" and use standard percent-encoding to map them into the lexical space of URL path segments.
Example 3 with key-as-segment syntax and current syntax
single quote can be literal within string or percent-encoded and isn't doubled (using ~/ as a shortcut for the service root)
~/People/O'Neil
~/People/O%27Neil
~/People('O''Neil')
~/People(%27O%27%27Neil%27)
~/People%28%27O%27%27Neil%27%29
Forward-slash within string must be percent-encoded just as in paren syntax
~/Categories/Smartphone%2FTablet
~/Categories('Smartphone%2FTablet')
was:
Key-as-Segment uses the (primary) key of an entity type. The number and sequence of <PropertyRef> elements within the <Key> defines the number and sequence of path segments that have to be attached to the path of the collection to identify an item in a collection.
Primitive types are represented in path key segments without "single quote decoration" or "double single quotes within" and use standard percent-encoding to map them into the lexical space of URL path segments.
Example 3 with key-as-segment syntax and current syntax
single quote can be literal within string or percent-encoded and isn't doubled:
http://host/service/People/O'Neil
http://host/service/People/O%27Neil
http://host/service/People('O''Neil')
http://host/service/People(%27O%27%27Neil%27)
http://host/service/People%28%27O%27%27Neil%27%29
Forward-slash within string must be percent-encoded just as in paren syntax
http://host/service/Categories/Smartphone%2FTablet
http://host/service/Categories('Smartphone%2FTablet')
> Define Key-As-Segment URL convention for resource paths
> -------------------------------------------------------
>
> Key: ODATA-799
> URL: https://issues.oasis-open.org/browse/ODATA-799
> Project: OASIS Open Data Protocol (OData) TC
> Issue Type: Improvement
> Components: OData URL Conventions
> Affects Versions: V4.0_ERRATA02
> Reporter: Ralf Handl
> Assignee: Ralf Handl
> Labels: AdoptionBlocker
> Fix For: V4.01_WD01
>
>
> Typical web APIs use path segments for key access to collection elements:
> ~/Users
> ~/Users/42
> Specify how such a URL convention would look like, considering
> - multi-part keys
> - the Edm primitive type system
> - bound actions/functions on entity-set level
> - context URLs for contained entities which include the key
> - relative context URLs
> Consider notation that allows context URLs to be relative to the service root.
--
This message was sent by Atlassian JIRA
(v6.2.2#6258)
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]