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

OData Version 4.02 Release Candidate #239

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
24 changes: 23 additions & 1 deletion examples/Org.OData.JSON.V1.Schema-sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@
}
},
"json.schema.sample": {
"$Alias": "this",
"container": {
"$Kind": "EntityContainer",
"Employees": {
"$Collection": true,
"$Type": "this.Employee"
}
},
"Employee": {
"$Kind": "EntityType",
"$Key": [
"empid"
],
"empid": {
"$Type": "Edm.Int32"
},
"resume": {
"$Type": "JSON.JSON",
"$Nullable": true
}
},
"example": {
"$Kind": "ComplexType",
"CodeDictionary": {
Expand All @@ -37,5 +58,6 @@
}
}
}
}
},
"$EntityContainer": "json.schema.sample.container"
}
18 changes: 15 additions & 3 deletions examples/Org.OData.JSON.V1.Schema-sample.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
<edmx:Include Namespace="Org.OData.Core.V1" Alias="Core" />
Expand All @@ -7,7 +7,19 @@
<edmx:Include Namespace="Org.OData.JSON.V1" Alias="JSON" />
</edmx:Reference>
<edmx:DataServices>
<Schema Namespace="json.schema.sample" xmlns="http://docs.oasis-open.org/odata/ns/edm">
<Schema Namespace="json.schema.sample" Alias="this" xmlns="http://docs.oasis-open.org/odata/ns/edm">

<EntityContainer Name="container">
<EntitySet Name="Employees" EntityType="this.Employee" />
</EntityContainer>

<EntityType Name="Employee">
<Key>
<PropertyRef Name="empid" />
</Key>
<Property Name="empid" Type="Edm.Int32" Nullable="false" />
<Property Name="resume" Type="JSON.JSON" Nullable="true" />
</EntityType>

<ComplexType Name="example">
<Property Name="CodeDictionary" Type="JSON.JSON" Nullable="false">
Expand All @@ -22,4 +34,4 @@

</Schema>
</edmx:DataServices>
</edmx:Edmx>
</edmx:Edmx>
14 changes: 12 additions & 2 deletions vocabularies/Org.OData.Capabilities.V1.json
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,10 @@
"Value": "SearchExpression",
"@Core.Description": "String property can be used as first operand in `startswith`, `endswith`, and `contains` clauses"
},
{
"Value": "MultiValueOrSearchExpression",
"@Core.Description": "String property can be used like in `MultiValue` and like in `SearchExpression`, combined with `or`"
},
{
"Value": "MultiRangeOrSearchExpression",
"@Core.Description": "Property can be compared to a union of zero or more closed, half-open, or open intervals plus zero or more simple string patterns",
Expand Down Expand Up @@ -749,14 +753,20 @@
"UnsupportedExpressions": {
"$Type": "Capabilities.SearchExpressions",
"$DefaultValue": "none",
"@Core.Description": "Expressions not supported in $search"
"@Core.Description": "Expressions not supported in $search as specified by the standard syntax [OData-URL, section 5.1.8.1](https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html#SearchExpressions)",
"@Core.LongDescription": "An unsupported expression may be treated as a term to be matched even if the\n standard syntax treats it as a keyword."
},
"SearchSyntax": {
"$Nullable": true,
"@Core.IsURL": true,
"@Core.Description": "URL of the $search syntax supported by the service (null means the standard syntax [OData-URL, section 5.1.8.1](https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html#SearchExpressions))"
}
},
"SearchExpressions": {
"$Kind": "EnumType",
"$IsFlags": true,
"none": 0,
"[email protected]": "Single search term",
"[email protected]": "No unsupported expressions",
"AND": 1,
"[email protected]": "Multiple search terms, optionally separated by `AND`",
"OR": 2,
Expand Down
450 changes: 226 additions & 224 deletions vocabularies/Org.OData.Capabilities.V1.md

Large diffs are not rendered by default.

16 changes: 14 additions & 2 deletions vocabularies/Org.OData.Capabilities.V1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,10 @@ supported:
<PropertyValue Property="Value" String="SearchExpression" />
<Annotation Term="Core.Description" String="String property can be used as first operand in `startswith`, `endswith`, and `contains` clauses" />
</Record>
<Record>
<PropertyValue Property="Value" String="MultiValueOrSearchExpression" />
<Annotation Term="Core.Description" String="String property can be used like in `MultiValue` and like in `SearchExpression`, combined with `or`" />
</Record>
<Record>
<PropertyValue Property="Value" String="MultiRangeOrSearchExpression" />
<Annotation Term="Core.Description" String="Property can be compared to a union of zero or more closed, half-open, or open intervals plus zero or more simple string patterns" />
Expand Down Expand Up @@ -578,12 +582,20 @@ supported:
<Annotation Term="Core.Description" String="$search is supported" />
</Property>
<Property Name="UnsupportedExpressions" Type="Capabilities.SearchExpressions" Nullable="false" DefaultValue="none">
<Annotation Term="Core.Description" String="Expressions not supported in $search" />
<Annotation Term="Core.Description" String="Expressions not supported in $search as specified by the standard syntax [OData-URL, section 5.1.8.1](https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html#SearchExpressions)" />
<Annotation Term="Core.LongDescription">
<String>An unsupported expression may be treated as a term to be matched even if the
standard syntax treats it as a keyword.</String>
</Annotation>
</Property>
<Property Name="SearchSyntax" Type="Edm.String" Nullable="true">
<Annotation Term="Core.IsURL" />
<Annotation Term="Core.Description" String="URL of the $search syntax supported by the service (null means the standard syntax [OData-URL, section 5.1.8.1](https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html#SearchExpressions))" />
</Property>
</ComplexType>
<EnumType Name="SearchExpressions" IsFlags="true">
<Member Name="none" Value="0">
<Annotation Term="Core.Description" String="Single search term" />
<Annotation Term="Core.Description" String="No unsupported expressions" />
</Member>
<Member Name="AND" Value="1">
<Annotation Term="Core.Description" String="Multiple search terms, optionally separated by `AND`" />
Expand Down
9 changes: 9 additions & 0 deletions vocabularies/Org.OData.Core.V1.json
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,15 @@
"@Core.Description": "Instances of a type are annotated with this tag if they have no common structure in a given response payload",
"@Core.LongDescription": "The select-list of a context URL MUST be `(@Core.AnyStructure)` if it would otherwise be empty,\n but this instance annotation SHOULD be omitted from the response value."
},
"Constructor": {
"$Kind": "Term",
"$Type": "Core.Tag",
"$DefaultValue": true,
"$AppliesTo": [
"Action"
],
"@Core.Description": "On success the annotated action creates a new entity"
},
"IsDelta": {
"$Kind": "Term",
"$Type": "Core.Tag",
Expand Down
3 changes: 2 additions & 1 deletion vocabularies/Org.OData.Core.V1.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ Term|Type|Description
[SymbolicName](Org.OData.Core.V1.xml#L536)|[SimpleIdentifier](#SimpleIdentifier)|<a name="SymbolicName"></a>A symbolic name for a model element
[GeometryFeature](Org.OData.Core.V1.xml#L545)|[GeometryFeatureType?](#GeometryFeatureType)|<a name="GeometryFeature"></a>A [Feature Object](https://datatracker.ietf.org/doc/html/rfc7946#section-3.2) represents a spatially bounded thing
[AnyStructure](Org.OData.Core.V1.xml#L561)|[Tag](#Tag)|<a name="AnyStructure"></a>Instances of a type are annotated with this tag if they have no common structure in a given response payload<br>The select-list of a context URL MUST be `(@Core.AnyStructure)` if it would otherwise be empty, but this instance annotation SHOULD be omitted from the response value.
[IsDelta](Org.OData.Core.V1.xml#L569)|[Tag](#Tag)|<a name="IsDelta"></a>The annotated Action or Function Parameter or Return Type is represented as a Delta payload<br>The parameter or result is represented as a delta payload, which may include deleted entries as well as changes to related entities and relationships, according to the format-specific delta representation.
[Constructor](Org.OData.Core.V1.xml#L569)|[Tag](#Tag)|<a name="Constructor"></a>On success the annotated action creates a new entity
[IsDelta](Org.OData.Core.V1.xml#L573)|[Tag](#Tag)|<a name="IsDelta"></a>The annotated Action or Function Parameter or Return Type is represented as a Delta payload<br>The parameter or result is represented as a delta payload, which may include deleted entries as well as changes to related entities and relationships, according to the format-specific delta representation.

<a name="RevisionType"></a>
## [RevisionType](Org.OData.Core.V1.xml#L80)
Expand Down
4 changes: 4 additions & 0 deletions vocabularies/Org.OData.Core.V1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,10 @@ Any simple identifier | Any type listed in `Validation.OpenPropertyTypeConstrain
</Annotation>
</Term>

<Term Name="Constructor" Type="Core.Tag" Nullable="false" DefaultValue="true" AppliesTo="Action">
<Annotation Term="Core.Description" String="On success the annotated action creates a new entity" />
</Term>

<Term Name="IsDelta" Type="Core.Tag" Nullable="false" DefaultValue="true" AppliesTo="ReturnType Parameter">
<Annotation Term="Core.Description" String="The annotated Action or Function Parameter or Return Type is represented as a Delta payload" />
<Annotation Term="Core.LongDescription">
Expand Down
Loading