Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
O

openapi-go

> 编程语言
Open source

OpenAPI structures for Go

353 stars0 likes1 views
WebsiteGitHub

About

OpenAPI structures for Go

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 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Gocode-generationdocumentation-generatorhacktoberfestjson-schema

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

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