UNPKG

@typespec/openapi3

Version:

TypeSpec library for emitting OpenAPI 3.0 and OpenAPI 3.1 from the TypeSpec REST protocol binding and converting OpenAPI3 to TypeSpec

16 lines 703 B
import type { DecoratorContext, Model, ModelProperty, Union } from "@typespec/compiler"; /** * Specify that `oneOf` should be used instead of `anyOf` for that union. */ export type OneOfDecorator = (context: DecoratorContext, target: Union | ModelProperty) => void; /** * Specify an external reference that should be used inside of emitting this type. * * @param ref External reference(e.g. "../../common.json#/components/schemas/Foo") */ export type UseRefDecorator = (context: DecoratorContext, target: Model | ModelProperty, ref: string) => void; export type TypeSpecOpenAPIDecorators = { oneOf: OneOfDecorator; useRef: UseRefDecorator; }; //# sourceMappingURL=TypeSpec.OpenAPI.d.ts.map