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

25 lines 1.55 kB
import { EmitterOutput, ObjectBuilder, Placeholder } from "@typespec/asset-emitter"; import { Enum, IntrinsicScalarName, IntrinsicType, Model, ModelProperty, Scalar, Tuple, Union } from "@typespec/compiler"; import { CreateSchemaEmitter } from "./openapi-spec-mappings.js"; import { OpenAPI3SchemaEmitterBase } from "./schema-emitter.js"; import { OpenAPISchema3_1 } from "./types.js"; export declare const createSchemaEmitter3_1: CreateSchemaEmitter; /** * OpenAPI 3.1 schema emitter. Deals with emitting content of `components/schemas` section. */ export declare class OpenAPI31SchemaEmitter extends OpenAPI3SchemaEmitterBase<OpenAPISchema3_1> { #private; applyCustomConstraints(type: Scalar | Model | ModelProperty | Union | Enum, target: ObjectBuilder<OpenAPISchema3_1>, refSchema?: OpenAPISchema3_1): void; applyEncoding(typespecType: Scalar | ModelProperty, target: OpenAPISchema3_1 | Placeholder<OpenAPISchema3_1>): OpenAPISchema3_1; applyModelIndexer(schema: ObjectBuilder<any>, model: Model): void; getRawBinarySchema(): OpenAPISchema3_1; getSchemaForStdScalars(scalar: Scalar & { name: IntrinsicScalarName; }): OpenAPISchema3_1; enumSchema(en: Enum): OpenAPISchema3_1; unionSchema(union: Union): ObjectBuilder<OpenAPISchema3_1>; intrinsic(intrinsic: IntrinsicType, name: string): EmitterOutput<object>; tupleLiteral(tuple: Tuple): EmitterOutput<Record<string, any>>; tupleLiteralValues(tuple: Tuple): EmitterOutput<Record<string, any>>; } //# sourceMappingURL=schema-emitter-3-1.d.ts.map