/loads

openapi specification object model

Primary LanguageGoApache License 2.0Apache-2.0

Loads OAI specs Build Status codecov

license GoDoc Go Report Card

Loading of OAI v2 API specification documents from local or remote locations. Supports JSON and YAML documents.

Primary usage:

  import (
	  "github.com/go-openapi/loads"
  )

  ...

	// loads a YAML spec from a http file
	doc, err := loads.Spec(ts.URL)
  
  ...

  // retrieves the object model for the API specification
  spec := doc.Spec()

  ...

See also the provided examples.