With JayStack OData v4 Server you can build your own data endpoints without the hassle of implementing any protocol-level code. This framework binds OData v4 requests to your annotated controller functions, and compiles OData v4 compatible response. Clients can access services through OData-compliant HTTP requests. We recommend the JayData library for consuming OData v4 APIs.
` @Edm.Annotate({ term: "UI.DisplayName", string: "Products" })
export class Product{ @Edm.Key @Edm.Computed @Edm.String @Edm.Convert(toObjectID) @Edm.Annotate({ term: "UI.DisplayName", string: "Product identifier" }, { term: "UI.ControlHint", string: "ReadOnly" }) _id:ObjectID @Edm.ForeignKey("Product") @Edm.EntityType(Edm.ForwardRef(() => Product)) @Edm.Partner("Product") Product:Product UnitPrice:number }
`