0.4.9 • Published 1 year ago

zapier-platform-json-schema v0.4.9

Weekly downloads
16
License
MIT
Repository
github
Last release
1 year ago

Build Status

Zapier Platform JSON Schema

This project converts json Schema to the ZapierPlatform schema with zero runtime dependencies.

Getting started

  • npm install zapier-platform-json-schema --save

  • yarn add zapier-platform-json-schema

const {default: ZapierSchemaBuilder} = require ("zapier-platform-json-schema");

const schema = {
    "type": "object",
    "properties": {
        "stringProp": {
            "type": "string"
        },
        "excludedProp": {
            "type": "string"
        },
    },
};

console.log(new ZapierSchemaBuilder(schema)
  .addExclude("excludedProp")
  .build());

// prints: [ { key: 'stringProp', type: 'string' } ]

Features

The following list summarize the current scope and supported features of this lib.

FeatureStatusComment
stringsExample
booleanExample
datetimeExample
enumExample
array of enumExample
array
anyOf
anyOf prefer non-stringExample
$ref to external
$ref to objectExample
$ref to enumExample
get nested defeintionExample
Additional propsExample
requiredExample
labelExample

Test

To run the test just use the yarn script: yarn test

Release

Just add a new tag via github or git tag please use Semantic Versioning 2.0.0

0.4.9

1 year ago

0.4.7

4 years ago

0.4.4

5 years ago

0.4.0

5 years ago

0.3.9

5 years ago

0.3.8

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.2

5 years ago

0.3.0

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.2

5 years ago

0.1.0

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