Page Contents
Home > @loopback/typeorm > getModelSchema
getModelSchema() function
Describe the provided Entity as a reference to a definition shared by multiple endpoints. The definition is included in the returned schema.
Signature:
export declare function getModelSchema<T extends object>(modelCtor: Function & {
prototype: T;
}, options?: JsonSchemaOptions<T>): SchemaObject;
Parameters
| Parameter | Type | Description |
|---|---|---|
| modelCtor | Function & { prototype: T; } | The entity constructor (e.g. Product) |
| options | JsonSchemaOptions<T> | Additional options |
Returns:
SchemaObject