Skip to content

[F] $useRef

function $useRef(
context,
entity,
jsonRef): void

@useRef - is used to replace the TypeSpec model type in emitter output with a pre-existing named OpenAPI schema such as ARM common types.

Parameters

ParameterTypeDescription
contextDecoratorContext-
entityModel | ModelProperty-
jsonRefstringpath or Uri to an OpenAPI schema. @useRef can be specified on Models and ModelProperty.

Returns

void