Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swag to OpenAPI Converter

Built with ❤️

This package was created because https://github.com/swaggo/swag does not support openapi 3.0.

It is essentially a copy of swag's main.go and added kin-openapi conversion functions.

Installation

go install github.com/dimasdanz/swag-openapi3

How To

As it's just a copy, all the flag in swag's cli should work. One caveat, the outputType is hardcoded to json file because kin-openapi's converter does not work well with other type.

Run swag's comment format. Assuming GOPATH BIN is in the env's PATH

openapi fmt

Generate OpenAPI 3.0

openapi init --output out -requiredByDefault

About

Built with ❤️

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages