Adapters
An adapter is the front door of the pipeline. It reads your specification and converts it into the universal AST. Everything downstream, every plugin and parser, works off that AST and never touches the original spec. The adapter is the one place that knows whether the input was OpenAPI, AsyncAPI, or something you invented.
Why adapters exist
Without this boundary, every plugin would need its own OpenAPI reader, and adding a new input format would mean rewriting all of them. The adapter pulls that knowledge into a single layer, so writing one adapter for a format lets the entire plugin ecosystem work on top of it unchanged. That is what lets Kubb target OpenAPI today and AsyncAPI or a GraphQL schema tomorrow without touching the generators.
Kubb ships @kubb/adapter-oas for OpenAPI 2.0, 3.0, and 3.1, and picks it for you when you import defineConfig from the kubb package. You write a custom adapter only when your source is a format Kubb does not parse yet.