0.4.9 • Published 3 years ago
zapier-platform-json-schema v0.4.9
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 --saveyarn 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.
| Feature | Status | Comment |
|---|---|---|
| strings | ✅ | Example |
| boolean | ✅ | Example |
| datetime | ✅ | Example |
| enum | ✅ | Example |
| array of enum | ✅ | Example |
| array | ✅ | |
| anyOf | ✅ | |
| anyOf prefer non-string | ✅ | Example |
| $ref to external | ❌ | |
| $ref to object | ✅ | Example |
| $ref to enum | ✅ | Example |
| get nested defeintion | ✅ | Example |
| Additional props | ✅ | Example |
| required | ✅ | Example |
| label | ✅ | Example |
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
3 years ago
0.4.7
5 years ago
0.4.4
6 years ago
0.4.0
6 years ago
0.3.9
6 years ago
0.3.8
6 years ago
0.3.6
6 years ago
0.3.5
6 years ago
0.3.4
6 years ago
0.3.2
6 years ago
0.3.0
6 years ago
0.2.4
7 years ago
0.2.3
7 years ago
0.2.1
7 years ago
0.2.0
7 years ago
0.1.2
7 years ago
0.1.0
7 years ago
0.0.4
7 years ago
0.0.3
7 years ago
0.0.2
7 years ago
0.0.1
7 years ago