x-to-zod / SchemaInputAdapter
Interface: SchemaInputAdapter
Defined in: src/SchemaInput/index.ts:29
Protocol for plugging alternative input formats into the x-to-zod pipeline.
Implement this interface to teach x-to-zod about a new schema format without modifying any core file.
Methods
getMetadata()
ts
getMetadata(input): SchemaMetadata;Defined in: src/SchemaInput/index.ts:33
Parameters
input
unknown
Returns
getRef()
ts
getRef(input): string | undefined;Defined in: src/SchemaInput/index.ts:32
Parameters
input
unknown
Returns
string | undefined
isValid()
ts
isValid(input): boolean;Defined in: src/SchemaInput/index.ts:30
Parameters
input
unknown
Returns
boolean
selectParser()
ts
selectParser(input, refs): ParserConstructor | undefined;Defined in: src/SchemaInput/index.ts:31
Parameters
input
unknown
refs
Returns
ParserConstructor | undefined