reports

package
v0.14.3 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CategoryStatistic

type CategoryStatistic struct {
	ID           uint      `gorm:"primaryKey" json:"-" yaml:"-"`
	CreatedAt    time.Time `json:"-" yaml:"-"`
	UpdatedAt    time.Time `json:"-" yaml:"-"`
	CategoryName string    `json:"categoryName" yaml:"categoryName"`
	CategoryId   string    `json:"categoryId" yaml:"categoryId"`
	NumIssues    int       `json:"numIssues" yaml:"numIssues"`
	Score        int       `json:"score" yaml:"score"`
	Warnings     int       `json:"warnings" yaml:"warnings"`
	Errors       int       `json:"errors" yaml:"errors"`
	Info         int       `json:"info" yaml:"info"`
	Hints        int       `json:"hints" yaml:"hints"`
}

CategoryStatistic represents the number of issues for a particular category

type Range added in v0.0.4

type Range struct {
	Start RangeItem `json:"start,omitempty" yaml:"start,omitempty"`
	End   RangeItem `json:"end,omitempty" yaml:"end,omitempty"`
}

Range indicates the start and end of a report item

type RangeItem added in v0.0.4

type RangeItem struct {
	Line int `json:"line" yaml:"line"`
	Char int `json:"character" yaml:"character"`
}

RangeItem indicates the line and character of a range.

type ReportStatistics

type ReportStatistics struct {
	ID                 uint                 `gorm:"primaryKey" json:"-" yaml:"-"`
	CreatedAt          time.Time            `json:"-" yaml:"-"`
	UpdatedAt          time.Time            `json:"-" yaml:"-"`
	FilesizeKB         int                  `json:"filesizeKb,omitempty" yaml:"filesizeKb,omitempty"`
	FilesizeBytes      int                  `json:"filesizeBytes,omitempty" yaml:"filesizeBytes,omitempty"`
	SpecType           string               `json:"specType,omitempty" yaml:"specType,omitempty"`
	SpecFormat         string               `json:"specFormat,omitempty" yaml:"specFormat,omitempty"`
	Version            string               `json:"version,omitempty" yaml:"version,omitempty"`
	References         int                  `json:"references,omitempty" yaml:"references,omitempty"`
	ExternalDocs       int                  `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
	Schemas            int                  `json:"schemas,omitempty" yaml:"schemas,omitempty"`
	Parameters         int                  `json:"parameters,omitempty" yaml:"parameters,omitempty"`
	Links              int                  `json:"links,omitempty" yaml:"links,omitempty"`
	Paths              int                  `json:"paths,omitempty" yaml:"paths,omitempty"`
	Operations         int                  `json:"operations,omitempty" yaml:"operations,omitempty"`
	Tags               int                  `json:"tags,omitempty" yaml:"tags,omitempty"`
	Examples           int                  `json:"examples,omitempty" yaml:"examples,omitempty"`
	Enums              int                  `json:"enums,omitempty" yaml:"enums,omitempty"`
	Security           int                  `json:"security,omitempty" yaml:"security,omitempty"`
	OverallScore       int                  `json:"overallScore,omitempty" yaml:"overallScore,omitempty"`
	TotalErrors        int                  `json:"totalErrors,omitempty" yaml:"totalErrors,omitempty"`
	TotalWarnings      int                  `json:"totalWarnings,omitempty" yaml:"totalWarnings,omitempty"`
	TotalInfo          int                  `json:"totalInfo,omitempty" yaml:"totalInfo,omitempty"`
	TotalHints         int                  `json:"totalHints,omitempty" yaml:"totalHints,omitempty"`
	CategoryStatistics []*CategoryStatistic `gorm:"foreignKey:ID" json:"categoryStatistics,omitempty" yaml:"categoryStatistics,omitempty"`
}

ReportStatistics represents statistics for an individual specification report.

type SpectralReport added in v0.0.4

type SpectralReport struct {
	Code     string   `json:"code" yaml:"code"`         // the rule that was run
	Path     []string `json:"path" yaml:"path"`         // the path to the item, broken down into a slice
	Message  string   `json:"message" yaml:"message"`   // the result message
	Severity int      `json:"severity" yaml:"severity"` // the severity reported
	Range    Range    `json:"range" yaml:"range"`       // the location of the issue in the spec.
	Source   string   `json:"source" yaml:"source"`     // the source of the report.
}

SpectralReport represents a model that can be deserialized into a spectral compatible output.

Jump to

Keyboard shortcuts

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