The OpenAPI specification version to target ("3.0" or "3.1"). Defaults to "3.1" for enhanced JSON Schema compatibility.
Array of original TypeScript types that were analyzed to generate the JSON schemas. This provides type safety and traceability back to the source TypeScript definitions.
// Generate schemas for OpenAPI v3.1 (default)
const schemas = typia.json.schemas<[User, Product]>();
// Type: IJsonSchemaCollection<"3.1", [User, Product]>
// Generate schemas for OpenAPI v3.0 (Swagger compatibility)
const swaggerSchemas = typia.json.schemas<[User, Product], "3.0">();
// Type: IJsonSchemaCollection<"3.0", [User, Product]>
Collection of JSON schemas with OpenAPI specification support.
IJsonSchemaCollection
represents a comprehensive collection of JSON schemas that can be generated from TypeScript types using thetypia.json.schemas()
function. This interface supports both OpenAPI v3.0 and v3.1 specifications, with the ability to automatically generate appropriate schema definitions based on the specified version.The collection includes:
Key differences between versions: