Skip to content

About

Zero-dependency instant JSON Schema and TypeScript d.ts generator from raw JSON samples & stdin

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

schema-craft

License: MIT

A zero-dependency instant JSON Schema and TypeScript declaration generator from raw JSON samples, files, or stdin.


Why schema-craft?

Writing JSON Schema or TypeScript interfaces by hand for complex API responses is tedious. schema-craft takes any JSON payload (or pipes from curl) and instantly crafts:

  1. JSON Schema Draft-07 with detected formats (uuid, date-time, integers vs floats).
  2. Clean TypeScript Interfaces with proper indentation and nested types.

Quick Usage

# Generate JSON Schema from a file
npx schema-craft response.json

# Pipe curl directly to TypeScript types
curl -s https://api.github.com/users/luckdevx | npx schema-craft --ts --name GitHubUser

# Output to a file
npx schema-craft sample.json --ts --out src/types/api.d.ts

License

MIT © luckdevx

About

Zero-dependency instant JSON Schema and TypeScript d.ts generator from raw JSON samples & stdin

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages