Skip to main content
Version: Latest (0.60.x)

Decorators

TypeSpec.OpenAPI

@oneOf

Specify that oneOf should be used instead of anyOf for that union.

@TypeSpec.OpenAPI.oneOf

Target

Union | ModelProperty

Parameters

None

@useRef

Specify an external reference that should be used inside of emitting this type.

@TypeSpec.OpenAPI.useRef(ref: valueof string)

Target

Model | ModelProperty

Parameters

NameTypeDescription
refvalueof stringExternal reference(e.g. "../../common.json#/components/schemas/Foo")