JSON TypeBox スキーマ生成ツール (高速 JSON Schema 型プロバイダー)
JSON構造を高パフォーマンスなTypeBoxのType.Object定義へ変換し、Fastify、Ajv、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>;瞬時のTypeBoxスキーマ生成
任意のJSONデータを静的なTypeBoxのType.Object定義に変換し、UUID、ISOタイムスタンプ、メールアドレス等の形式を自動検出します。
100% クライアントサイド保護
サーバーへのデータ送信は一切ありません。JSONペイロード、APIスキーマ、独自データモデルはすべてブラウザのサンドボックス内で安全に処理されます。
Fastify & Ajv ネイティブ統合
JSON Schema Draft-07/2020-12互換の型定義を出力し、Static<typeof T>による静的推論、TypeCompilerのJIT高速検証、Fastify型プロバイダー連携をフルサポート。