specs

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2017 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadAPIVersions

func LoadAPIVersions(service *Service, specFormat string) (map[string]*APIVersion, error)

LoadAPIVersions loads all API version files information.

Types

type APIVersion

type APIVersion struct {
	Filename string
	FilePath string
	Spec     *Spec
}

A APIVersion holds the information of an API service's version.

type Service

type Service struct {
	Filename         string
	FilePath         string
	LatestAPIVersion *APIVersion
	APIVersions      map[string]*APIVersion
}

A Service holds the information of API service.

func LoadServices

func LoadServices(specDirectory, specFormat string, serviceModule string) (*Service, error)

LoadServices walks through the specs directory and load API spec information.

type Spec

type Spec struct {
	Filename    string
	FilePath    string
	FileContent string

	Format string

	Data *capsules.Data
}

A Spec holds the information of an API spec file.

type Swagger

type Swagger struct {
	FilePath string
	Data     *capsules.Data
}

Swagger holds the data that to parse swagger spec.

func (*Swagger) Parse

func (s *Swagger) Parse(version string) error

Parse parses swagger spec to data.

Jump to

Keyboard shortcuts

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