Skip to content

Function: makeReferenceSchemaFromObjectSchema


makeReferenceSchemaFromObjectSchema(schema, identityName?): GenericObjectSchema & ObjectSchemaProperty

Convenience for creating a reference object schema from an existing schema for the object. Copies over the identity, idProperty, and displayProperty from the schema, and the subset of properties indicated by the idProperty and displayProperty. A reference schema can always be defined directly, but if you already have an object schema it provides better code reuse to derive a reference schema instead.


Name Type
schema ObjectSchemaDefinition<string, string> & ObjectSchemaProperty
identityName? string


GenericObjectSchema & ObjectSchemaProperty

Defined in