Decorators
Autorest
Section titled “Autorest”@example
Section titled “@example”@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
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| pathOrUri | valueof string | path or Uri to the example file. |
| title | valueof string | name or description of the example file. |
@useRef
Section titled “@useRef”@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
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| jsonRef | valueof string | path or Uri to an OpenAPI schema. |