百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
O

openapi-go

> 编程语言
开源

Go 的 OpenAPI 结构

353 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

Go 的 OpenAPI 结构

OpenAPI structures for Go

This library provides Go structures to marshal/unmarshal and reflect OpenAPI Schema documents.

For automated HTTP REST service framework built with this library please check github.com/swaggest/rest.

Features

  • Type safe mapping of OpenAPI 3 documents with Go structures generated from schema.
  • Type-based reflection of Go structures to OpenAPI 3.0 or 3.1 schema.
  • Schema control with field tags
    • json for request bodies and responses in JSON
    • query, path for parameters in URL
    • header, cookie, formData, file for other parameters
    • form acts as query and formData
    • contentType indicates body content type
    • field tags named after JSON Schema/OpenAPI 3 Schema constraints
    • collectionFormat to unpack slices from string
      • csv comma-separated values,
      • ssv space-separated values,
      • pipes pipe-separated values (|),
      • multi ampersand-separated values (&),
      • json additionally to slices unpacks maps and structs,
  • Flexible schema control with jsonschema-go

Example

Other examples.

…

Output:

…

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Gocode-generationdocumentation-generatorhacktoberfestjson-schema

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言