merge

package
v2.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenAPISpec

type OpenAPISpec struct {
	OpenAPI      string                 `json:"openapi" yaml:"openapi"` // Required
	Info         interface{}            `json:"info" yaml:"info"`       // Required
	Tags         interface{}            `json:"tags,omitempty" yaml:"tags,omitempty"`
	Security     interface{}            `json:"security,omitempty" yaml:"security,omitempty"`
	Servers      interface{}            `json:"servers,omitempty" yaml:"servers,omitempty"`
	ExternalDocs interface{}            `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
	Paths        map[string]interface{} `json:"paths" yaml:"paths"` // Required
	Components   components             `json:"components,omitempty" yaml:"components,omitempty"`
}

OpenAPISpec is highlevel container for an OpenAPI spec. This can be used for safely decode and encode an openapi spec.

func OpenAPI

func OpenAPI(baseSpec io.Reader, path string) (*OpenAPISpec, error)

spec, err := merge.OpenAPI(baseSpec, "./openapi/parts")

if err != nil {
	log.Fatal(err)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL