| title |
Odata |
| description |
Odata protocol schemas |
**Source:** `packages/spec/src/api/odata.zod.ts`
import { ODataConfigSchema, ODataErrorSchema, ODataFilterFunctionSchema, ODataFilterOperatorSchema, ODataMetadataSchema, ODataQuerySchema, ODataResponseSchema } from '@objectstack/spec/api';
import type { ODataConfig, ODataError, ODataFilterFunction, ODataFilterOperator, ODataMetadata, ODataQuery, ODataResponse } from '@objectstack/spec/api';
// Validate data
const result = ODataConfigSchema.parse(data);
| Property |
Type |
Required |
Description |
| enabled |
boolean |
optional |
Enable OData API |
| path |
string |
optional |
OData endpoint path |
| metadata |
object |
optional |
OData metadata configuration |
| Property |
Type |
Required |
Description |
| error |
object |
✅ |
|
contains
startswith
endswith
length
indexof
substring
tolower
toupper
trim
concat
year
month
day
hour
minute
second
date
time
now
maxdatetime
mindatetime
round
floor
ceiling
cast
isof
any
all
eq
ne
lt
le
gt
ge
and
or
not
(
)
in
has
| Property |
Type |
Required |
Description |
| namespace |
string |
✅ |
Service namespace |
| entityTypes |
object[] |
✅ |
Entity types |
| entitySets |
object[] |
✅ |
Entity sets |
| Property |
Type |
Required |
Description |
| $select |
string | string[] |
optional |
Fields to select |
| $filter |
string |
optional |
Filter expression (OData filter syntax) |
| $orderby |
string | string[] |
optional |
Sort order |
| $top |
integer |
optional |
Max results to return |
| $skip |
integer |
optional |
Results to skip |
| $expand |
string | string[] |
optional |
Navigation properties to expand |
| $count |
boolean |
optional |
Include total count |
| $search |
string |
optional |
Search expression |
| $format |
Enum<'json' | 'xml' | 'atom'> |
optional |
Response format |
| $apply |
string |
optional |
Aggregation expression |
| Property |
Type |
Required |
Description |
| @odata.context |
string |
optional |
Metadata context URL |
| @odata.count |
integer |
optional |
Total results count |
| @odata.nextLink |
string |
optional |
Next page URL |
| value |
Record<string, any>[] |
✅ |
Results array |