Since OData WebApi V5.6, it supports odata.include-annotations.
odata.include-annotations
It supports the following four templates:
- odata.include-annotations=”*” // all annotations
- odata.include-annotations=”-*” // no annotations
- odata.include-annotations=”display.*” // only annotations under “display” namespace
- odata.include-annotations=”display.subject” // only annotation with term name “display.subject”
Let’s have examples:
odata.include-annotations=*
We can use the following codes to request all annotations:
The response will have all annotations:
odata.include-annotations=Entry.*
We can use the following codes to request specify annotations:
The response will only have annotations in “Entry” namespace: