...

Package operations

import "github.com/go-openapi/analysis/internal/flatten/operations"
Overview
Index

Overview ▾

func AllOpRefsByRef

func AllOpRefsByRef(specDoc Provider, operationIDs []string) map[string]OpRef

AllOpRefsByRef returns an index of sortable operations

func GatherOperations

func GatherOperations(specDoc Provider, operationIDs []string) map[string]OpRef

GatherOperations builds a map of sorted operations from a spec

func OpRefsByRef

func OpRefsByRef(oprefs map[string]OpRef) map[string]OpRef

OpRefsByRef indexes a map of sortable operations

type OpRef

OpRef is an indexable, sortable operation

type OpRef struct {
    Method string
    Path   string
    Key    string
    ID     string
    Op     *spec.Operation
    Ref    spec.Ref
}

type OpRefs

OpRefs is a sortable collection of operations

type OpRefs []OpRef

func (OpRefs) Len

func (o OpRefs) Len() int

func (OpRefs) Less

func (o OpRefs) Less(i, j int) bool

func (OpRefs) Swap

func (o OpRefs) Swap(i, j int)

type Provider

Provider knows how to collect operations from a spec

type Provider interface {
    Operations() map[string]map[string]*spec.Operation
}