Skip to content

Decorators

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

@TypeSpec.OpenAPI.oneOf

Union | ModelProperty

None

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

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

Model | ModelProperty

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