Skip to content

Decorators

@example - attaches example files to an operation. Multiple examples can be specified.

@example can be specified on Operations.

@Autorest.example(pathOrUri: valueof string, title: valueof string)

Operation

NameTypeDescription
pathOrUrivalueof stringpath or Uri to the example file.
titlevalueof stringname or description of the example file.

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

@useRef can be specified on Models and ModelProperty.

@Autorest.useRef(jsonRef: valueof string)

Model | ModelProperty

NameTypeDescription
jsonRefvalueof stringpath or Uri to an OpenAPI schema.