[OASIS Issue Tracker] (ODATA-994) consider replacing SchemaVersion header with $SchemaVersion query option, or root URL versioning

From
OASIS Issues Tracker <>
Date
2016-11-03T17:02:17+00:00
ID
Thread
[OASIS Issue Tracker] (ODATA-994) consider replacing SchemaVersion header with $SchemaVersion query option, or root URL versioning
[ https://issues.oasis-open.org/browse/ODATA-994?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Pizzo updated ODATA-994:
--------------------------------

    Description: In OData-980 we clarified how odata.type is annotated, but this brought up the question as to whether we should be using a SchemaVersion request header or a $SchemaVersion query option to request a particular version of data.  A queryoption (or root url versioning) has the advantage of making the response cacheable, we just need to make sure composition rules are well thought-out (i.e., for using contexturl as base for relative references)  (was: The SchemaVersion header and accompanying annotation are intended to allow breaking changes without having to change the service root URL.

How does this combine with type referencing in the @odata.type annotation?

We could annotate the @odata.type annotation with the @Core.SchemaVersion:

    "@odata.type":"https://some.whe.re/$metadata"
    "@":"2.0.1",

Or we could add a system query option and make the schema version part of the URL:

    "@odata.type":"https://some.whe.re/$metadata?$SchemaVersion=2.0.1",

Or we could reconsider this and fall back to root URL versioning:

    "@odata.type":"https://some.whe.re;v=2.0.1/$metadata",)

> consider replacing SchemaVersion header with $SchemaVersion query option, or root URL versioning
> ------------------------------------------------------------------------------------------------
>
>                 Key: ODATA-994
>                 URL: https://issues.oasis-open.org/browse/ODATA-994
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Improvement
>          Components: OData Protocol
>    Affects Versions: V4.01_WD01
>         Environment: Proposed
>            Reporter: Ralf Handl
>             Fix For: V4.01_WD01
>
>
> In OData-980 we clarified how odata.type is annotated, but this brought up the question as to whether we should be using a SchemaVersion request header or a $SchemaVersion query option to request a particular version of data.  A queryoption (or root url versioning) has the advantage of making the response cacheable, we just need to make sure composition rules are well thought-out (i.e., for using contexturl as base for relative references)



--
This message was sent by Atlassian JIRA
(v6.2.2#6258)