awesome-repositories.com
博客
MCP
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
deepmap avatar

deepmap/oapi-codegen

0
View on GitHub↗
8,398 星标·1,037 分支·Go·Apache-2.0·13 次浏览

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.
  • 开发工具 - Generates Go client and server code from OpenAPI specs.

Star 历史

deepmap/oapi-codegen 的 Star 历史图表deepmap/oapi-codegen 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Oapi Codegen 的开源替代方案

相似的开源项目,按与 Oapi Codegen 的功能重合度排序。
  • oapi-codegen/oapi-codegenoapi-codegen 的头像

    oapi-codegen/oapi-codegen

    8,088在 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
    在 GitHub 上查看↗8,088
  • rsuter/nswagRSuter 的头像

    RSuter/NSwag

    7,342在 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#
    在 GitHub 上查看↗7,342
  • swagger-api/swagger-codegenswagger-api 的头像

    swagger-api/swagger-codegen

    17,760在 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
    在 GitHub 上查看↗17,760
  • go-swagger/go-swaggergo-swagger 的头像

    go-swagger/go-swagger

    9,989在 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
    在 GitHub 上查看↗9,989
查看 Oapi Codegen 的所有 30 个替代方案→

常见问题解答

deepmap/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.

deepmap/oapi-codegen 的主要功能有哪些?

deepmap/oapi-codegen 的主要功能包括:API Client Generators, Schema-to-Struct Mappers, OpenAPI Processors, Client Library Generation, Code Generators, Server Boilerplate Generators, API Model Generators, Data Model Generators。

deepmap/oapi-codegen 有哪些开源替代品?

deepmap/oapi-codegen 的开源替代品包括: 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…