oapi-codegen is a production-grade OpenAPI 3.0/3.1 code generator for Go that produces idiomatic server stubs, typed HTTP clients, and data models. It supports multiple Go web frameworks (Chi, Echo, Fiber v2/v3, Gin, Gorilla, Iris, and stdlib net/http) and generates both plain and strict server interfaces with middleware composition, request validation, and error handling. The generator is configurable via YAML files and offers features like import mapping for multi-package specs, OpenAPI overlay support, webhook generation, streaming responses, custom struct tags, and configurable schema-merging behaviors (v1/v2/v3) for allOf/anyOf/oneOf composition. The architecture is a library with a CLI wrapper (`cmd/oapi-codegen`). The core generation pipeline loads and validates an OpenAPI spec, gathers schemas from components/operations, resolves naming collisions, merges composed schemas, prunes unused components, and renders Go source files via user-overridable text/template files. The codebase is extensively tested with hundreds of generated regression tests covering edge cases in schema composition, parameter serialization, content types, and framework-specific behavior. The generator also embeds the original spec as a compressed base64 blob in generated packages for runtime access. Key reusable components include a robust naming resolution algorithm with collision handling, a configurable struct tag generation system with eager validation, a dead-code elimination module for pruning unused schema components, and standalone security providers (Bearer token, API key, Basic auth) for generated clients. The project maintains compatibility layers for schema-merging behavior versions and deprecated APIs, ensuring smooth upgrades while preserving existing generated code.