Isomor JSON Schema Generator
raw JSON → 3.0.0 verified Fri May 01 auth: no javascript
isomor-json-schema-generator version 3.0.0 is a library for Isomor, a framework that abstracts frontend-backend layers by automatically generating API layers from a single codebase, eliminating the need for REST or GraphQL. It uses Babel transpilation to separate client and server code, with strong TypeScript support. This package specifically handles JSON schema generation for Isomor. Release cadence is tied to Isomor; actively maintained. Key differentiator: seamless integration with Isomor's automatic layer generation.
Common errors
error SyntaxError: Cannot use import statement outside a module ↓
cause Using require() or running without ESM support.
fix
Add "type": "module" to package.json or use .mjs extension.
error Error: Cannot find module 'isomor-json-schema-generator' ↓
cause Package not installed or incorrectly imported.
fix
Run 'npm install isomor-json-schema-generator' and ensure correct import path.
error TypeError: generateSchema is not a function ↓
cause Using default import when package only exports named function.
fix
Use named import: import { generateSchema } from 'isomor-json-schema-generator'
Warnings
breaking ESM-only: require will cause runtime error. ↓
fix Use import syntax instead of require.
gotcha Default export may not exist; use named exports. ↓
fix Verify named exports by reading package documentation or index.d.ts.
breaking Node version <11 not supported. ↓
fix Upgrade Node to version 11 or higher.
deprecated Deprecated as of Isomor v3? Check release notes. ↓
fix Use isomor's built-in schema generation if available.
Install
npm install isomor-json-schema-generator yarn add isomor-json-schema-generator pnpm add isomor-json-schema-generator Imports
- default wrong
const generateSchema = require('isomor-json-schema-generator')correctimport generateSchema from 'isomor-json-schema-generator' - generateSchema wrong
import generateSchema from 'isomor-json-schema-generator'correctimport { generateSchema } from 'isomor-json-schema-generator' - SchemaGenerator
import { SchemaGenerator } from 'isomor-json-schema-generator'
Quickstart
import { generateSchema } from 'isomor-json-schema-generator';
import { join } from 'path';
const schema = generateSchema({
source: join(process.cwd(), 'src', 'api'),
output: join(process.cwd(), 'schema.json'),
});
console.log('Schema generated at:', schema);