swagger

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Definition

type Definition struct {
	Required   []string   `json:"required"`
	Type       string     `json:"type"`
	Properties Properties `json:"properties"`
}

type Definitions

type Definitions map[string]*Definition

type Properties

type Properties map[string]*Property

type Property

type Property struct {
	Ref    string         `json:"$ref"`
	Format PropertyFormat `json:"format"`
	Type   PropertyType   `json:"type"`
	Items  *Property      `json:"items"`
}

type PropertyFormat

type PropertyFormat string
const (
	FormatDouble   PropertyFormat = "double"
	FormatInt32    PropertyFormat = "int32"
	FormatInt64    PropertyFormat = "int64"
	FormatDateTime PropertyFormat = "date-time"
)

type PropertyItems

type PropertyItems struct {
	Ref    string         `json:"$ref"`
	Format PropertyFormat `json:"format"`
	Type   PropertyType   `json:"type"`
}

type PropertyType

type PropertyType string
const (
	TypeString  PropertyType = "string"
	TypeInteger PropertyType = "integer"
	TypeNumber  PropertyType = "number"
	TypeArray   PropertyType = "array"
	TypeBoolean PropertyType = "boolean"
)

type Spec

type Spec struct {
	Definitions Definitions `json:"definitions"`
}

func FetchLocalSpec

func FetchLocalSpec(filename string) (*Spec, error)

func FetchRemoteSpec

func FetchRemoteSpec(url string) (*Spec, error)

Jump to

Keyboard shortcuts

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