0.0.10 • Published 5 years ago

odata-json-schema v0.0.10

Weekly downloads
12
License
MIT
Repository
github
Last release
5 years ago

odata-json-schema

Generate JSON Schemas with OData informations from OData $metadata.

Example

With the $metadata of service used in OData Doc, check example folder for the JSON Schemas generated.

Usage

const { generateJSONSchema } = require('odata-json-schema')

generateJSONSchema('https://services.odata.org/V4/TripPinService', {
  dist: './dist',
  // most types are nullable, you may want to limit generated schema size by considering some of the types are by default nullable
  isByDefaultNullable(ref) {
    if (ref === 'Edm/String') {
      return true;
    }
    return !ref.startsWith('Edm');
  },
  // by default enum value is not generated into the schema, if you need it set this value to true
  withEnumValue: true,
});
0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago