Page Contents

Home > @loopback/repository-json-schema > JsonSchemaOptions

JsonSchemaOptions interface


export interface JsonSchemaOptions<T extends object> 


Property Modifiers Type Description
exclude?   (keyof T)[] (Optional) List of model properties to exclude from the schema.
includeRelations?   boolean (Optional) Set this flag if you want the schema to define navigational properties for model relations.
optional?   (keyof T)[] (Optional) List of model properties to mark as optional. Overrides the “partial” option if it is not empty.
partial?   boolean | ‘deep’ <p>(Optional) Set this flag to mark all model properties as optional. This is typically used to describe request body of PATCH endpoints. This option will be overridden by the “optional” option if it is set and non-empty.</p><p>The flag also applies to nested model instances if its value is set to ‘deep’, such as:</p>
title?   string <p>(Optional) The title to use in the generated schema.</p><p>When using options like exclude, the auto-generated title can be difficult to read for humans. Use this option to change the title to a more meaningful value.</p>