oapi

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeWithRoot

func MergeWithRoot(root spec.OpenAPI, c container.Container) (err error)

MergeWithRoot will merge container with root document.

func SetPathsDefaults

func SetPathsDefaults(cnt container.Container, defops map[string]spec.Operation) (err error)

SetPathsDefaults will iterate through paths and apply default on each path. This might be useful for supplying default headers or default responses.

Types

type FlattenPath

type FlattenPath struct {
	Method    string
	Path      string
	Key       string
	Operation container.Container
}

FlattenPath represents single reuqest path in oapi spec.

type FlattenPaths

type FlattenPaths []FlattenPath

FlattenPaths list of FlattenPath

func Paths

func Paths(cnt container.Container) (ff FlattenPaths, err error)

Paths will parse paths in oapi container and return array of paths.

func (FlattenPaths) Match

func (fp FlattenPaths) Match(pattern string) (xx FlattenPaths, err error)

Match will match given path to given route

Directories

Path Synopsis
cmds
Package cmds is sort of like ast for oapenapi commands.
Package cmds is sort of like ast for oapenapi commands.

Jump to

Keyboard shortcuts

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