@odata/metadata

OData(V4) Metadata Utilities

Usage no npm install needed!

<script type="module">
  import odataMetadata from 'https://cdn.skypack.dev/@odata/metadata';
</script>

README

OData(V4) Metadata

npm (scoped) GitHub Workflow Status Codecov

This library implements the EDM and EDMX classes from the OData CSDL V4.

Features

  • Edm and Edmx classes
  • will provide Validation logic - based on specs (-on the way)
  • will Download and parse metadata from $metadata document or uri endpoint

Usage

$ npm install -S @odata/metadata

then just

import { Edm } from '@odata/metadata'

let entityType = new edm.EntityType({
   name: "Orders", 
   property: [{ name:"OrderID", type: Edm.Integer }]
})
entityType.properties.push(new Edm.Property(...))