parser

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2020 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 ParseError

type ParseError struct {
	Message string
	Err     error
}

ParseError returned when the input is an invalid model

func NewParseError

func NewParseError(name string, err error) *ParseError

NewParseError initializes a new error which happened during parsing and keeps the context of the model which is being processed

func (*ParseError) Error

func (e *ParseError) Error() string

Error formats the ParseError as a printable string

type SwaggerParser

type SwaggerParser struct{}

SwaggerParser implements the Parser interface and turns a swagger yaml file into the internal Definition structure which describes all operations and parameters of the service

func (SwaggerParser) Parse

func (p SwaggerParser) Parse(models []model.Data) ([]model.Definition, error)

Parse takes a list of model byte streams which need to contain valid swagger yaml and turns it into a list of Definition's

Jump to

Keyboard shortcuts

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