Registry / serialization / getkin-kin-openapi

getkin-kin-openapi

JSON →
library0.140.0gogounverified

A Go library for parsing and validating OpenAPI specifications.

go get github.com/getkin/kin-openapi
INSTALL
IMPORT
SIG · GETKIN-KIN-OPENAPI
G
getkin-kin-openapi
serializationgov0.140.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

openapi3
github.com/getkin/kin-openapi/openapi3

Loads and validates an OpenAPI specification from a file.

package main import ( "fmt" "github.com/getkin/kin-openapi/openapi3" ) func main() { loader := openapi3.NewLoader() doc, err := loader.LoadFromFile("openapi.yaml") if err != nil { panic(err) } if err := doc.Validate(loader.Context); err != nil { panic(err) } fmt.Println("OpenAPI spec is valid") }
Debug
Known issues
breakingThe library has undergone breaking changes between major versions.
fix
Check the version compatibility and migration guides when upgrading.
affects: >=0.100.0
Upgrade
Version history
0.140.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
getkin-kin-openapi — go get getkin-kin-openapi · libregistry