Générateur de schéma JSON vers TypeBox (Fournisseur de types JSON Schema rapide)
Convertissez des structures JSON en définitions TypeBox Type.Object haute performance pour Fastify, Ajv et la validation TypeScript à l'exécution.
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>;Génération instantanée de schémas TypeBox
Analyse n'importe quel JSON en définitions statiques Type.Object de TypeBox avec détection automatique des formats UUID, horodatages ISO et e-mails.
Confidentialité 100% côté client
Aucun envoi vers un serveur. Vos charges utiles JSON, schémas d'API et modèles de données sont traités exclusivement dans le bac à sable de votre navigateur.
Intégration native Fastify et Ajv
Génère des types 100% compatibles JSON Schema Draft-07/2020-12 avec inférence Static<typeof T>, rapidité JIT TypeCompiler et intégration Fastify.