incompatibility

package
v0.0.0-...-29359b1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

README

Building and Running Incompatibility scanning

In order to build the gnostic-grpc plugin make sure you have the pre-requisities as defined in the general README and then run the shell script

./plugin-creation.sh

An IncompatibilityReport which is defined here is not very informative but provides a classification for the incompatibilty as well as a severity level. Run the command with an appropriate file path to an OpenAPI document and an output location

gnostic --grpc-out=report=1:<output> <document>

An FileDescriptiveReport which is defined here, can be useful when singular file focused incompatibility information is needed. This report pairs incompatibilities with file position and a string detailing the incompatibility. To get such a report run the command with an appropriate file path to an OpenAPI document and an output location

gnostic --grpc-out=report=2:<output> <document>

Documentation

Index

Constants

View Source
const (
	BaseIncompatibility_Report = iota
	FileDescriptive_Report
)

Variables

View Source
var IncompatibilityReporters []IncompatibilityReporter = []IncompatibilityReporter{
	DocumentBaseSearch,
	PathsSearch,
	ComponentsSearch,
}

Collection of defined incompatibility reporters

Functions

func GnosticIncompatibiltyScanning

func GnosticIncompatibiltyScanning(env *plugins.Environment, reportType Report)

Runs incompatibility scanning under gnostic envirionment

Types

type IncompatibilityReporter

type IncompatibilityReporter func(*openapiv3.Document) []*Incompatibility

A reporter takes in any openapiv3 document and returns incopatibilities

type IntermediateReport

type IntermediateReport struct {
	// contains filtered or unexported fields
}

IntermediateReport counts the number of incompatibility occurrences

func CountIncompatibilities

func CountIncompatibilities(incompatibilities ...*Incompatibility) IntermediateReport

func (IntermediateReport) GetCountByClass

func (iReport IntermediateReport) GetCountByClass() []int32

func (IntermediateReport) GetCountBySeverity

func (iReport IntermediateReport) GetCountBySeverity() []int32

type Report

type Report int

Jump to

Keyboard shortcuts

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