https://github.com/orsinium-labs/openapi
Go package with type definitions for generating OpenAPI documentation.
https://github.com/orsinium-labs/openapi
go golang openapi swagger
Last synced: 5 months ago
JSON representation
Go package with type definitions for generating OpenAPI documentation.
- Host: GitHub
- URL: https://github.com/orsinium-labs/openapi
- Owner: orsinium-labs
- License: mit
- Created: 2024-12-30T10:04:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-05T12:33:14.000Z (12 months ago)
- Last Synced: 2025-05-07T18:15:05.983Z (11 months ago)
- Topics: go, golang, openapi, swagger
- Language: Go
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# openapi
Go package with type definitions for generating [OpenAPI](https://swagger.io/specification/) documentation.
## Installation
```bash
go get github.com/orsinium-labs/openapi
```
## Usage
```go
docs := openapi.OpenAPI{
Version: "3.0.2",
Info: openapi.Info{
Title: "Cool service",
},
Paths: openapi.Paths{
"/echo": openapi.PathItem{
Post: openapi.Operation{
Summary: "Scream into the void",
},
},
},
}
jsonDocs, err := json.Marshal(docs)
```