protoc-gen-openapi

command module
v0.7.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2025 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

protoc-gen-openapi

  • 本项目一个 protobuf openapi 插件的实现
  • 本项目早期参考了protoc-gen-openapi, 由于 gnostic 长时间不更新,并发现了优秀的替代品protoc-gen-connect-openapi, 现在基于protoc-gen-connect-openapi 做了部分修改
  • internal/converter 大部分都是来自于 protoc-gen-connect-openapi, copy.go 部分是自己的实现

为什么修改 protoc-gen-connect-openapi

  • protoc-gen-connect-openapi 刚好和本项目早期底层使用一致, 为本项目重构提供了很好的思路和想法
  • protoc-gen-connect-openapi 是为了 connect-go 生成 openapi 文档, 包含不少 connect 关键词
  • protoc-gen-connect-openapi 不支持 grpc service 级别的注解
  • protoc-gen-connect-openapi 针对企业内部业务级别的修改无法支持

改动部分

Installation:

go install github.com/pubgo/protoc-gen-openapi@latest

使用

参考 make protobuf_test

计划

  • 长期兼容 gnostic, 兼容 protoc-gen-connect-openapi, 后期会进行重构

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL