OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (ODATA-1135) Document use of JSON $schema


    [ https://issues.oasis-open.org/browse/ODATA-1135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=68505#comment-68505 ] 

Ralf Handl edited comment on ODATA-1135 at 12/14/17 2:34 PM:
-------------------------------------------------------------

CSDL JSON is an OData-specific JSON dialect that has nothing in common with JSON Schema. 

A CDSL JSON document MUST validate against the CSDL JSON meta schema.

A CSDL JSON document need not validate against the JSON Schema meta schema:

{
    "$Version": "4.0",
    "allOf": {
        "$Alias": "self"
    }
}

is valid CSDL JSON, defining an empty OData schema (the word "schema" is hopelessly overloaded :-) named "anyOf". 

"anyOf" is a valid OData identifier and happens to be also a JSON Schema keyword. However valid content for an OData schema is not a valid value for the JSON Schema keyword "anyOf", thus the above document validates against the CSDL JSON meta schema and does not validate against the JSON Schema meta schema.




was (Author: handl):
CSDL JSON is an OData-specific JSON dialect that has nothing in common with JSON Schema. 

A CDSL JSON document MUST validate against the CSDL JSON meta schema.

A CSDL JSON document need not validate against the JSON Schema meta schema:

{
    "$Version": "4.0",
    "allOf": {
        "$Alias": "self"
    }
}

is valid CSDL JSON, defining an empty OData schema (the word "schema" is hopelessly overloaded :-) named "anyOf". 

"anyOf" is a valid OData identifier and happens to be also a JSON Schema keyword. However valid content for an OData schema is not a valid value for the JSON Schema keyword, thus the above document validates against the CSDL JSON meta schema and does not validate against the JSON Schema meta schema.



> Document use of JSON $schema
> ----------------------------
>
>                 Key: ODATA-1135
>                 URL: https://issues.oasis-open.org/browse/ODATA-1135
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Improvement
>          Components: CSDL JSON 
>    Affects Versions: V4.01_CSD03
>            Reporter: George Ericson
>            Priority: Minor
>             Fix For: V4.01_CS01
>
>
> JSON recommends specification of the $schema attribute for validation.
> The specification silently supports this.
> Need to make this explicit.



--
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]