用于 Go 的 OpenAPI v3 代码生成器
# ogen() (https://pkg.go.dev/github.com/ogen-go/ogen#section-documentation) () (https://codecov.io/gh/ogen-go/ogen) () 用于 Go 的 OpenAPI v3 代码生成器。 - [开始使用](https://ogen.dev/docs/intro) - [示例项目](https://github.com/ogen-go/example) - [安全策略](https://github.com/ogen-go/ogen/blob/-/SECURITY.md) - [Telegram 群组 `@ogen_dev`](https://t.me/ogen_dev) # 安装 ```console go install -v github.com/ogen-go/ogen/cmd/ogen@latest ``` # 使用方式 ```go //go:generate go run github.com/ogen-go/ogen/cmd/ogen --target target/dir -package api --clean schema.json ``` 或使用容器: ```shell docker run --rm \ --volume ".:/workspace" \ ghcr.io/ogen-go/ogen:latest --target workspace/petstore --clean workspace/petstore.yml ``` # 特性
interface{}encoding/json 的限制uuid,date,date-time,uri 等字符串格式由 Go 类型直接表示nil 语义nil 表示没有值nil 表示值为 nilnil 目前与 [] 相同,但实际上是无效的type 的参数被表示为 Go anyfmt.Sprint 来灵活地编码值暂无开放 Issues,或尚未同步最近议题。