OpenAPI specification object model
- Easy to integrate.
go get github.com/neotoolkit/openapi
package main
import (
"fmt"
"io/ioutil"
"log"
"github.com/neotoolkit/openapi"
)
func main() {
file, err := ioutil.ReadFile("openapi.yml")
if err != nil {
log.Fatalln(err)
}
oapi, err := openapi.Parse(file)
if err != nil {
log.Fatalln(err)
}
fmt.Println(oapi.OpenAPI)
}
See these docs.