JSON zu TypeBox Schema-Generator (Schneller JSON-Schema-Typ-Provider)
Konvertieren Sie JSON-Strukturen in hochperformante TypeBox Type.Object-Definitionen für Fastify, Ajv und TypeScript-Laufzeitvalidierung.
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>;Sofortige TypeBox-Schema-Generierung
Parst beliebige JSON-Daten in statische TypeBox Type.Object-Definitionen mit automatischer Formaterkennung für UUID, ISO-Zeitstempel und E-Mails.
100% Client-Seitige Privatsphäre
Kein Server-Upload. Ihre JSON-Nutzlasten, API-Schemas und Datenmodelle werden vollständig in der lokalen Sandbox Ihres Browsers kompiliert.
Native Fastify- & Ajv-Integration
Erzeugt 100% JSON Schema Draft-07/2020-12 kompatible Typen mit Static<typeof T>-Inferenz, TypeCompiler JIT-Geschwindigkeit und Fastify-Type-Provider-Hooks.