Skip to content

Schemas JSON Structure

schemas.json defines how DBModeler renders validator-oriented schema output for the supported validation libraries.

This file describes how DBModeler maps modeled fields and constraints into library-specific validation syntax.

That includes:

  • library metadata
  • file extension targets
  • family-based type mappings
  • explicit type overrides
  • array handling
  • required setup notes
  • constraint rendering behavior

Validator export is not generic. Zod, Yup, AJV, TypeBox, Joi, and other libraries all express rules differently.

schemas.json is the translation layer that lets DBModeler generate those outputs from the same project model.

  • broad type families provide the default mapping
  • explicit type rules refine or extend those defaults
  • auto-generated database fields are often excluded from validator output
  • some validators need additional setup outside the generated schema file

You should understand schemas.json if you:

  • need to debug exported validator output
  • want to add support for another validation library
  • want to understand why a DBModeler field becomes a specific validator expression

Next: Glossary