Generador de esquemas JSON a TypeBox (Proveedor de tipos JSON Schema rápido)
Convierta estructuras JSON en definiciones TypeBox Type.Object de alto rendimiento para validación en tiempo de ejecución en Fastify, Ajv y TypeScript.
import { Type, Static } from '@sinclair/typebox';
UserProfileSchema = Type.Object({
id: Type.String(),
email: Type.String({ format: 'email' }),
username: Type.String(),
displayName: Type.String(),
role: Type.String(),
isVerified: Type.Boolean(),
tenant: Type.Object({
id: Type.String(),
name: Type.String(),
tier: Type.String(),
activeSeats: Type.Integer(),
billingContact: Type.String({ format: 'email' }),
}),
preferences: Type.Object({
theme: Type.String(),
notificationsEnabled: Type.Boolean(),
locale: Type.String(),
timezone: Type.String(),
}),
tags: Type.Array(Type.String()),
lastLoginAt: Type.String({ format: 'date-time' }),
createdAt: Type.String({ format: 'date-time' }),
});
UserProfile = Static<typeof UserProfileSchema>;Generación instantánea de esquemas TypeBox
Analiza cualquier JSON en definiciones estáticas Type.Object de TypeBox con detección automática de formatos para UUID, marcas de tiempo ISO y correos.
Privacidad 100% del lado del cliente
Cero subidas al servidor. Sus cargas útiles JSON, esquemas de API y modelos de datos se procesan estrictamente dentro del entorno de su navegador.
Integración nativa con Fastify y Ajv
Produce tipos 100% compatibles con JSON Schema Draft-07/2020-12 con inferencia Static<typeof T>, velocidad JIT de TypeCompiler y soporte para Fastify.