x-to-zod / JsonSchemaAdapter
Class: JsonSchemaAdapter
Defined in: src/SchemaInput/JsonSchemaAdapter.ts:8
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.
Implements
Constructors
Constructor
ts
new JsonSchemaAdapter(): JsonSchemaAdapter;Returns
JsonSchemaAdapter
Methods
getMetadata()
ts
getMetadata(input): SchemaMetadata;Defined in: src/SchemaInput/JsonSchemaAdapter.ts:27
Parameters
input
unknown
Returns
Implementation of
SchemaInputAdapter.getMetadata
getRef()
ts
getRef(input): string | undefined;Defined in: src/SchemaInput/JsonSchemaAdapter.ts:17
Parameters
input
unknown
Returns
string | undefined
Implementation of
isValid()
ts
isValid(input): boolean;Defined in: src/SchemaInput/JsonSchemaAdapter.ts:9
Parameters
input
unknown
Returns
boolean
Implementation of
selectParser()
ts
selectParser(input, _refs): ParserConstructor | undefined;Defined in: src/SchemaInput/JsonSchemaAdapter.ts:13
Parameters
input
unknown
_refs
Returns
ParserConstructor | undefined