Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

odata-json-schema

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

odata-json-schema

Generate JSON Schemas with OData informations from OData $metadata.

  • 0.0.10
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

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,
});

Keywords

FAQs

Package last updated on 18 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc