rewriteSchema
Function: rewriteSchema()
rewriteSchema(
schema,names):JSONSchema7
Defined in: sdk/src/generate/types.ts:12
Rewrite a schema for json-schema-to-typescript: local definitions are dropped (they were hoisted into the
manifest), every $ref points into the flat definitions of the root schema by TypeScript name, unresolvable refs
become unknown
Parameters
schema
JSONSchema7
a manifest schema
names
Map<string, string>
ref to TypeScript name
Returns
JSONSchema7
the rewritten copy