Skip to main content

internal.SchemaRef

Home > @backstage/backend-openapi-utils > internal > SchemaRef

Signature:

export type SchemaRef<Doc extends RequiredDoc, Schema> = Schema extends {
$ref: `#/components/schemas/${infer Name}`;
} ? 'schemas' extends keyof Doc['components'] ? Name extends keyof Doc['components']['schemas'] ? SchemaRef<Doc, Doc['components']['schemas'][Name]> : never : never : {
[Key in keyof Schema]: SchemaRef<Doc, Schema[Key]>;
};

References: RequiredDoc, SchemaRef