All Projects → jaystack → odata-v4-server

jaystack / odata-v4-server

Licence: other
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 libra…

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to odata-v4-server

Samples-ASP.NET-MVC-CSharp
ASP.NET MVC C# samples for Stimulsoft Reports.Web reporting tool.
Stars: ✭ 31 (-54.41%)
Mutual labels:  odata
n-odata-server
Node.js OData Server
Stars: ✭ 79 (+16.18%)
Mutual labels:  odata
ui5-cap-event-app
Showcase of SAP Cloud Application Programming Model and OData V4 with draft mode in a freestyle SAPUI5 app and an SAP Fiori elements app.
Stars: ✭ 70 (+2.94%)
Mutual labels:  odata
light-odata
OData(V2/V4) Client for javascript/typescript
Stars: ✭ 25 (-63.24%)
Mutual labels:  odata
abap-odata-smoke-test
This ABAP Report performs simple smoke tests for activated ODATA services, providing basic automated testing for your ODATA endpoints.
Stars: ✭ 13 (-80.88%)
Mutual labels:  odata
apim-cli
Axway API-Management CLI - Manage your platform from the command line or with your CI/CD pipeline
Stars: ✭ 25 (-63.24%)
Mutual labels:  odata
odata-v4-ng
OData service for Angular
Stars: ✭ 27 (-60.29%)
Mutual labels:  odata
service-fabric-queryable
Enable query support for your stateful services in Service Fabric via the OData protocol.
Stars: ✭ 42 (-38.24%)
Mutual labels:  odata
odata-filter-builder
OData Filter Builder
Stars: ✭ 42 (-38.24%)
Mutual labels:  odata
Aspnet Api Versioning
Provides a set of libraries which add service API versioning to ASP.NET Web API, OData with ASP.NET Web API, and ASP.NET Core.
Stars: ✭ 2,154 (+3067.65%)
Mutual labels:  odata
python-odata
A simple library for read/write access to OData services
Stars: ✭ 74 (+8.82%)
Mutual labels:  odata
cloud-abap-rap
This repository contains several examples how to develop with the ABAP RESTful Application Programming Model (RAP) in SAP BTP, ABAP environment.
Stars: ✭ 98 (+44.12%)
Mutual labels:  odata
Pomona
A fruitful way to REST
Stars: ✭ 23 (-66.18%)
Mutual labels:  odata
slickgrid-universal
Slickgrid-Universal is a monorepo which includes all Editors, Filters, Extensions, Services and is Framework Agnostic to take full advantage of SlickGrid core lib.
Stars: ✭ 29 (-57.35%)
Mutual labels:  odata
angular-odata-es5
OData Service for Angular.io (es5 version)
Stars: ✭ 45 (-33.82%)
Mutual labels:  odata
lodata
The OData v4.01 Producer for Laravel
Stars: ✭ 40 (-41.18%)
Mutual labels:  odata
odata2poco
generate POCO classes from OData service
Stars: ✭ 42 (-38.24%)
Mutual labels:  odata
aspnet-api-versioning
Provides a set of libraries which add service API versioning to ASP.NET Web API, OData with ASP.NET Web API, and ASP.NET Core.
Stars: ✭ 2,396 (+3423.53%)
Mutual labels:  odata
awesome-sql-builder
A small library for building SQL queries in a better way than regular string concatenation.
Stars: ✭ 44 (-35.29%)
Mutual labels:  odata
odata-sequelize
Parser library to transform an OData query string to a sequelize-compliant query
Stars: ✭ 19 (-72.06%)
Mutual labels:  odata

JayStack OData V4 Server

OData V4 server for node.js

Features

  • OASIS Standard OData Version 4.0 server
  • usable as a standalone server, as an Express router, as a node.js stream or as a library
  • expose service document and service metadata - $metadata
  • setup metadata using decorators or metadata JSON
  • supported data types are Edm primitives, complex types, navigation properties
  • support create, read, update, and delete entity sets, action imports, function imports, collection and entity bound actions and functions
  • support for full OData query language using odata-v4-parser
    • filtering entities - $filter
    • sorting - $orderby
    • paging - $skip and $top
    • projection of entities - $select
    • expanding entities - $expand
    • $count
  • support sync and async controller functions
  • support async controller functions using Promise, async/await or ES6 generator functions
  • support result streaming
  • support media entities

Controller and server functions parameter injection decorators

  • @odata.key
  • @odata.filter
  • @odata.query
  • @odata.context
  • @odata.body
  • @odata.result
  • @odata.stream

Example Northwind server

export class ProductsController extends ODataController{
    @odata.GET
    find(@odata.filter filter:ODataQuery){
        if (filter) return products.filter(createFilter(filter));
        return products;
    }

    @odata.GET
    findOne(@odata.key key:string){
        return products.filter(product => product._id == key)[0];
    }

    @odata.POST
    insert(@odata.body product:any){
        product._id = new ObjectID().toString();
        products.push(product);
        return product;
    }

    @odata.PATCH
    update(@odata.key key:string, @odata.body delta:any){
        let product = products.filter(product => product._id == key)[0];
        for (let prop in delta){
            product[prop] = delta[prop];
        }
    }

    @odata.DELETE
    remove(@odata.key key:string){
        products.splice(products.indexOf(products.filter(product => product._id == key)[0]), 1);
    }
}

export class CategoriesController extends ODataController{
    @odata.GET
    find(@odata.filter filter:ODataQuery){
        if (filter) return categories.filter(createFilter(filter));
        return categories;
    }

    @odata.GET
    findOne(@odata.key key:string){
        return categories.filter(category => category._id == key)[0];
    }

    @odata.POST
    insert(@odata.body category:any){
        category._id = new ObjectID().toString();
        categories.push(category);
        return category;
    }

    @odata.PATCH
    update(@odata.key key:string, @odata.body delta:any){
        let category = categories.filter(category => category._id == key)[0];
        for (let prop in delta){
            category[prop] = delta[prop];
        }
    }

    @odata.DELETE
    remove(@odata.key key:string){
        categories.splice(categories.indexOf(categories.filter(category => category._id == key)[0]), 1);
    }
}

@odata.cors
@odata.controller(ProductsController, true)
@odata.controller(CategoriesController, true)
export class NorthwindODataServer extends ODataServer{}
NorthwindODataServer.create("/odata", 3000);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].