Skip to main content
Version: Next 🚧

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")