Skip to content

A fork of Mark Borkum's OdataOnRails plugin. Now geminized and works with Rails 4.x.

License

Notifications You must be signed in to change notification settings

lmcalpin/odata_server

 
 

Repository files navigation

A more up-to-date version of this library is maintained at https://github.com/sebastiankliem/odata_server

OData Server

This is a rails plugin/engine to embue your application with OData features (so its data can be readily consumed by an OData client).

In OData, a service exposes a number of workspace. Each workspace is backed by a schema and contains a collection of entity collections. An entity collection is a related set of records.

Configure the plugin by adding a number of schema objects to OData::Edm::DataServices.schemas. Each schema is an instance of a subclass of OData::AbstractSchema::Base. We currently only support two implementations, and the specific implementation determines how to load the records, mapping the records’ properties to/from Edm data types, and handling filtering, sorting, and data retrieval.

  • OData::ActiveRecordSchema::Base – this iterates over your models exposing each as OData entities

and

  • OData::InMemorySchema::Base – this takes in a list of objects which are exposed as OData entities

This code is not heavily tested. It is alpha quality at best. Expect the API to change drastically over time.

See github.com/lmcalpin/odata_provider_example_rb for an example application that uses this gem.

About

A fork of Mark Borkum's OdataOnRails plugin. Now geminized and works with Rails 4.x.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 99.8%
  • HTML 0.2%