awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
deepmap avatar

deepmap/oapi-codegen

0
View on GitHub↗
8,398 stars·1,037 forks·Go·Apache-2.0·19 views

Oapi Codegen

oapi-codegen is a suite of generators that converts OpenAPI 3 specifications into type-safe Go client libraries, server boilerplate, and data models. It provides tools for producing production-ready HTTP clients and server-side interfaces to ensure that Go implementations remain compliant with defined API contracts.

The tool supports server generation across various web frameworks and allows for extensive customization via template overrides, specification overlays, and custom type definition mappings. It handles complex API requirements through external reference resolution to organize code across multiple packages and specification overlay merging to modify definitions without altering the original source.

The project covers data modeling with specialized handling for nullable types to distinguish between missing fields and explicit null values. It also includes middleware for request validation to verify that incoming HTTP requests match the specification schemas.

Features

  • API Client Generators - Generates production-ready, type-safe Go client code from OpenAPI specifications.
  • Schema-to-Struct Mappers - Transforms OpenAPI JSON schemas into strongly typed Go structures with custom tags for serialization.
  • OpenAPI Processors - Processes OpenAPI specifications to generate Go server boilerplate and interface definitions.
  • Client Library Generation - Transforms OpenAPI specifications into functional, type-safe Go client libraries.
  • Code Generators - Generates type-safe Go client and server boilerplate directly from OpenAPI 3 specifications.
  • Server Boilerplate Generators - Creates server-side scaffolding and interface definitions for Go backends to accelerate API implementation.
  • API Model Generators - Creates type definitions and data structures based on the schemas defined in an OpenAPI specification.
  • Data Model Generators - Converts OpenAPI schemas into type-safe Go definitions and data models.
  • Type-Safe Client Generators - Produces type-safe request and response handlers for Go applications based on API specifications.
  • Automated Data Contracts - Automates the creation of data models and request validation logic based on a shared OpenAPI specification.
  • Request Validation Middleware - Provides middleware to verify that incoming HTTP requests match the API specification schemas.
  • Server Scaffolding Tools - Creates server-side interfaces and request handlers for various Go web frameworks to ensure contract compliance.
  • Code Boilerplate Templates - Uses external template files to map OpenAPI specification elements into Go source code structures.
  • Configuration Overlays - Updates or removes elements from a specification using an overlay file without altering the original source.
  • Go Development Workflows - Accelerates the development of Go web services by generating boilerplate and handling complex type definitions.
  • Nullability Constraint Enforcement - Distinguishes between omitted fields, null values, and actual data using specialized type wrappers.
  • Nullability Wrappers - Implements specialized wrapper types to distinguish between missing fields and explicit null values in API responses.
  • Specification Overlays - Combines a primary OpenAPI document with a secondary overlay file to modify API definitions before generation.
  • Code Generators - Generates boilerplate code from OpenAPI 3.0 definitions.
  • Development Tools - Generates Go client and server code from OpenAPI specs.

Star history

Star history chart for deepmap/oapi-codegenStar history chart for deepmap/oapi-codegen

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Frequently asked questions

What does deepmap/oapi-codegen do?

oapi-codegen is a suite of generators that converts OpenAPI 3 specifications into type-safe Go client libraries, server boilerplate, and data models. It provides tools for producing production-ready HTTP clients and server-side interfaces to ensure that Go implementations remain compliant with defined API contracts.

What are the main features of deepmap/oapi-codegen?

The main features of deepmap/oapi-codegen are: API Client Generators, Schema-to-Struct Mappers, OpenAPI Processors, Client Library Generation, Code Generators, Server Boilerplate Generators, API Model Generators, Data Model Generators.

What are some open-source alternatives to deepmap/oapi-codegen?

Open-source alternatives to deepmap/oapi-codegen include: oapi-codegen/oapi-codegen — oapi-codegen is an OpenAPI specification compiler and code generator for Go. It transforms OpenAPI definitions into… rsuter/nswag — NSwag is a toolchain for the .NET ecosystem designed to automate the generation of API documentation, server… swagger-api/swagger-codegen — Swagger Codegen is a template-driven engine and multi-language toolkit used to generate API client SDKs, server stubs,… go-swagger/go-swagger — go-swagger is a toolkit for working with Swagger/OpenAPI 2.0 specifications in Go. It generates server, client, and… alovajs/alova — Alova is a frontend data fetching library and HTTP request toolkit designed to manage remote data states and… fastify/fastify — This project is a high-performance web framework designed for building scalable server-side applications with minimal…

Open-source alternatives to Oapi Codegen

Similar open-source projects, ranked by how many features they share with Oapi Codegen.
  • oapi-codegen/oapi-codegenoapi-codegen avatar

    oapi-codegen/oapi-codegen

    8,088View on GitHub↗

    oapi-codegen is an OpenAPI specification compiler and code generator for Go. It transforms OpenAPI definitions into type-safe Go client libraries, server boilerplate, and data models to facilitate contract-first API development. The tool distinguishes itself through a flexible customization system that allows users to override generated types and imports via specification extensions. It supports the use of custom text templates to redefine the final source code structure and provides a specification overlay mechanism to modify or remove endpoints without altering the original source file. Th

    Gogogolangopenapi
    View on GitHub↗8,088
  • rsuter/nswagRSuter avatar

    RSuter/NSwag

    7,342View on GitHub↗

    NSwag is a toolchain for the .NET ecosystem designed to automate the generation of API documentation, server controllers, and typed client proxies from OpenAPI contracts. It functions as a contract-first API tool that enables the creation of server-side boilerplate and client libraries based on predefined specifications. The suite distinguishes itself through its ability to extract OpenAPI specifications from existing ASP.NET Core code via reflection and its capacity to generate type-safe TypeScript client proxies. It also provides an interactive documentation server that hosts and renders th

    C#
    View on GitHub↗7,342
  • swagger-api/swagger-codegenswagger-api avatar

    swagger-api/swagger-codegen

    17,760View on GitHub↗

    Swagger Codegen is a template-driven engine and multi-language toolkit used to generate API client SDKs, server stubs, and human-readable documentation from OpenAPI specifications. It translates these specifications into functional libraries and boilerplate routing code across various target programming languages. The tool utilizes a pluggable generator module system and an integrated template engine, allowing for the customization of generated source code and the creation of new language-specific generators. It supports flexible specification sourcing via local files, remote HTTP endpoints,

    Mustacheopen-sourceopenapi-specificationopenapi3
    View on GitHub↗17,760
  • go-swagger/go-swaggergo-swagger avatar

    go-swagger/go-swagger

    9,989View on GitHub↗

    go-swagger is a toolkit for working with Swagger/OpenAPI 2.0 specifications in Go. It generates server, client, and CLI code from a specification document, and can also produce a specification by scanning annotated Go source code. The project includes a static validation engine that checks documents against the schema and project-specific rules, and a specification transformation pipeline that resolves, flattens, and merges documents. The toolkit generates both client and server code from the same specification, ensuring consistency in request and response handling. It also produces a command

    Goapicode-generatorgo
    View on GitHub↗9,989
See all 30 alternatives to Oapi Codegen→