Skip to content

[I] MetadataInfo

Provides information about changes that happen to a data type’s payload when inapplicable metadata is added or invisible properties are removed.

Results are computed on demand and expensive computations are memoized.

Methods

getEffectivePayloadType()

getEffectivePayloadType(type, visibility): Type

If type is an anonymous model, tries to find a named model that has the same set of properties when non-payload properties are excluded.

Parameters

ParameterType
typeType
visibilityVisibility

Returns

Type


isOptional()

isOptional(property, visibility): boolean

Determines if the given property is optional in the request or response payload for the given visibility.

Parameters

ParameterType
propertyModelProperty
visibilityVisibility

Returns

boolean


isPayloadProperty()

isPayloadProperty(
property,
visibility,
inExplicitBody?): boolean

Determines if the given property is part of the request or response payload and not applicable metadata isApplicableMetadata or filtered out by the given visibility.

Parameters

ParameterType
propertyModelProperty
visibilityVisibility
inExplicitBody?boolean

Returns

boolean


isTransformed()

isTransformed(type, visibility): boolean

Determines if the given type is transformed by applying the given visibility and removing invisible properties or adding inapplicable metadata properties.

Parameters

ParameterType
typeundefined | Type
visibilityVisibility

Returns

boolean