Schemas
TYPE
@skmtc/core 0.63.4TypeSystemArgs
Arguments for type system transformation functions.
Signature
import type { TypeSystemArgs } from '@skmtc/core'
type TypeSystemArgs<Schema extends SchemaType> = { ... }Schema
The specific schema type being transformed
Properties
The generation context containing utilities and state
destinationPath, string required
The destination path for the generated artifact
schema, Schema required
The schema to transform
required, boolean | undefined required
Whether the schema field is required
Examples
Example
function transformStringSchema(args: TypeSystemArgs<OasSchema>): TypeSystemString {
const { context, schema, required } = args;
// Transform string schema to type system representation
return {
type: 'string',
format: schema.format,
enums: schema.enums,
modifiers: { optional: !required, nullable: schema.nullable }
};
}