Registry / devops / zapier-platform-json-schema

zapier-platform-json-schema

JSON →
library0.4.9jsnpmunverified

Converts JSON Schema definitions to Zapier Platform schema format with no runtime dependencies. Version 0.4.9 is the current stable release. The library provides a fluent builder API for transforming JSON Schema properties into the Zapier field format, supporting types like string, boolean, datetime, enum, array, anyOf, and $ref to objects/enums. It does not support $ref to external files. Suitable for Zapier app developers who need to programmatically generate integration schemas from existing JSON Schema definitions. The project appears to be maintained with regular updates.

npm install zapier-platform-json-schema
INSTALL
IMPORT
SIG · ZAPIER-PLATFORM-JS
Z
zapier-platform-json-schema
devopsjavascriptv0.4.9
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ZapierSchemaBuilder
import { ZapierSchemaBuilder } from 'zapier-platform-json-schema'
const ZapierSchemaBuilder = require('zapier-platform-json-schema').default;
The package exports the class as a named export, not default. Do not use .default.
default
import { ZapierSchemaBuilder } from 'zapier-platform-json-schema'
import ZapierSchemaBuilder from 'zapier-platform-json-schema'
There is no default export; always use named import.
ZapierSchemaBuilder
const { ZapierSchemaBuilder } = require('zapier-platform-json-schema')
const ZapierSchemaBuilder = require('zapier-platform-json-schema')
CJS users must destructure; the export is not a default export.

Shows basic usage: creating a builder, excluding a property, and building the Zapier schema.

const { ZapierSchemaBuilder } = require('zapier-platform-json-schema'); const schema = { "type": "object", "properties": { "stringProp": { "type": "string" }, "excludedProp": { "type": "string" }, }, }; const builder = new ZapierSchemaBuilder(schema) .addExclude('excludedProp'); console.log(builder.build()); // Output: [ { key: 'stringProp', type: 'string' } ]
Debug
Known issues
gotchaImport must be named, not default. Using require('...') returns an object with the class as a property named 'ZapierSchemaBuilder'.
fix
Use `const { ZapierSchemaBuilder } = require('...')` or `import { ZapierSchemaBuilder } from '...'`.
affects: all
gotchaNo support for external $ref (e.g., $ref to a separate file). Only internal $ref to definitions within the same schema object are supported.
fix
Inline external schemas or use a different library if external $ref is needed.
affects: all
deprecatedNo deprecation notices at this time.
affects: none
Errors
Common errors & fixes
TypeError: Class constructor ZapierSchemaBuilder cannot be invoked without 'new'
Using the class without `new` keyword, or incorrectly importing as default.
fix
Ensure you use `new ZapierSchemaBuilder(schema)` with the correct named import.
Cannot find module 'zapier-platform-json-schema' or its corresponding type declarations.
TypeScript cannot resolve the package; likely missing or incorrect import style.
fix
Install the package: `npm install zapier-platform-json-schema` and import as `import { ZapierSchemaBuilder } from 'zapier-platform-json-schema'`.
Upgrade
Version history
0.4.9latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
24
Resources
zapier-platform-json-schema — npm install zapier-platform-json-schema · libregistry