Page Contents

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

JsonSchemaOptions interface


export interface JsonSchemaOptions<T extends object> 


Property Type Description
exclude (keyof T)[] List of model properties to exclude from the schema.
includeRelations boolean Set this flag if you want the schema to define navigational properties for model relations.
optional (keyof T)[] List of model properties to mark as optional. Overrides the “partial” option if it is not empty.
partial boolean | ‘deep’ 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.The flag also applies to nested model instances if its value is set to ‘deep’, such as:
title string The title to use in the generated schema.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.