OData 4.01
OData Version 4.01 adds various new features and removes a few restrictions. These changes can be categorized into:
- Extended Query Language
- Simplified Syntax
- Simplified Payloads
- Easier partial adoption of OData in existing REST APIs
OData 4.01 is highly compatible, incremental release over OData 4.0. A compliant 4.01 OData Service fully supports OData 4.0 clients. New OData 4.01 query features and simplified syntax can be supported as compatible extensions to OData 4.0 syntax. Content negotiation is facilitated through the ODataVersion header to ensure OData 4.0 clients don't receive unexpected constructs in response payloads.
The follow table represents the state of implementation of the above mentioned simplified options in the existing OData .NET stack.
Protocol
FEATURE | ODL | WebAPI |
---|---|---|
NEW | ||
Default Namespaces. Spec | N | N |
Schema Versioning. Spec | N | N |
Headers EntityId and Isolation without OData- prefix. Spec | N | N |
Preference omit-values. Spec | Y | N |
Response Header AsyncResult. Spec | N | N |
System Query Option $compute. Spec | Y | N |
Indexing into Ordered Collections and Positional Insert. Spec | N | N |
Deep Update. Spec | Y | N |
Set-Based Operations. Spec | Y | Y |
$expand and $select with POST and PATCH. Spec | N/A | N |
Invoking Functions with Implicit Parameter Aliases. Spec | N | N |
Referencing an ETag in a Batch Request. Spec | N | N |
Referencing across Change Sets in a Batch Request. Spec | N | N |
Referencing Nested Inserted Entities. Spec | N | N |
Referencing Values in Response Bodies. Spec | N | N |
IMPROVED | ||
Case-Insensitive System Query Options without $ prefix. Spec | Y | Y |
URL Conventions
FEATURE | ODL | WebAPI |
---|---|---|
NEW | ||
Alternate Keys.Spec | N | N |
Key-as-Segment Convention.Spec | Y | Y |
Addressing Operations without Namespace or Alias.Spec | Y | Y |
Addressing a Member of an Ordered Collection.Spec | N | N |
Annotation values in expressions.Spec | N | N |
Casting String Values to Primitive Values.Spec | N | N |
in Operator.Spec | Y | Y |
divby Operator.Spec | N | N |
hassubset and hassubsequence Collection Functions.Spec | N | N |
$expand of Stream Properties and Media Resources.Spec | N | N |
System Query Option $compute..Spec | Y | N |
System Query Option $index..Spec | Y | N |
Conditional Function: Case..Spec | N | N |
IMPROVED | ||
EQ Comparison. Spec | N | N |
Case-Insensitive Operators and Functions. Spec | Y | Y |
Enumeration and Duration Literals without Prefix. Spec | N | N |
Collection Overloads for Functions concat, contains, endswith, indexof, length,startswith, and substring Spec | N | N |
substring with Negative Start Index. Spec | N | N |
/$count.. Spec | N | N |
System Query Option $search.. Spec | N | N |
System Query Option $select.. Spec | N | N |
CSDL changes (XML)
FEATURE | ODL | WebAPI |
---|---|---|
NEW | ||
Decimal with Floating Scale. Spec | N | N |
Built-in Abstract Type Edm.Untyped.. Spec | Y | N |
Built-in Types for Terms: Edm.AnyPropertyPath and Edm.ModelElementPath Spec | N | N |
Key-Less Entity Types. Spec | Y | Y |
Terms applying to Collections. Spec | N | N |
Annotations targeting Parameters and Return Types. Spec | Y | N |
Inheriting Annotations. Spec | N | N |
Absolute Paths in Annotations. Spec | N | N |
Annotation Expressions Has, In, Add, Sub, Neg, Mul, Div, DivBy, and Mod.. Spec | N | N |
Client-Side Function odata.matchesPattern.. Spec | N | N |
All URL Functions as Client-Side Functions. Spec | N | N |
IMPROVED | ||
Key Properties. Spec | N | N |
Inheritance. Spec | N | N |
Referential Constraints. Spec | N | N |
Unicode Facet. Spec | N | N |
OData JSON format
FEATURE | ODL | WebAPI |
---|---|---|
NEW | ||
Simplified representation of Delta with Expand. Spec | Y | Y |
Advertise Actions/Functions on Collection-Valued Properties. Spec | N | N |
Advertise Non-Availability of Actions/Functions. Spec | N | N |
Batch Requests and ResponsesSpec | Y | N |
IMPROVED | ||
Exponential Notation for Decimals. Spec | N | N |
Control Information without prefix odata... Spec | Y | N |
@type for Built-In Primitive Types. Spec | Y | N |
Representation of Deleted Entities.Spec | Y | N |
Representation of Deleted Links. Spec | Y | Y |
Invoke Parameterless Actions with Empty Request Body.Spec | N | N |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for