interface IOpenApiService
Since 0.1.0

Service for generating and retrieving OpenAPI 3.1 specifications.

Methods

getSpec(): Readonly<Record<string, unknown>>

Returns the generated OpenAPI 3.1 document.

Builds the spec lazily on first call and caches it for subsequent calls.

addSchema(
name: string,
schema: unknown
): void

Registers a named schema for deduplication.

Usage

import { type IOpenApiService } from "openapi-plugin/src/index.ts";