Documentation ¶
Index ¶
- func ExecuteHtmlTemplate(tmpl *template.Template, changes ChangesByEndpoint, ...) ([]byte, error)
- func ExecuteTextTemplate(tmpl *template.Template, changes ChangesByEndpoint, ...) ([]byte, error)
- func GetSupportedFormats() []string
- func SupportedFormatsByContentType(output Output) []string
- type Change
- type Changes
- type ChangesByEndpoint
- type Check
- type Checks
- type Endpoint
- type Format
- type Formatter
- type FormatterOpts
- type GitHubActionsFormatter
- func (f GitHubActionsFormatter) RenderChangelog(changes checker.Changes, opts RenderOpts, specInfoPair *load.SpecInfoPair) ([]byte, error)
- func (f GitHubActionsFormatter) RenderChecks(Checks, RenderOpts) ([]byte, error)
- func (f GitHubActionsFormatter) RenderDiff(*diff.Diff, RenderOpts) ([]byte, error)
- func (f GitHubActionsFormatter) RenderFlatten(*openapi3.T, RenderOpts) ([]byte, error)
- func (f GitHubActionsFormatter) RenderSummary(*diff.Diff, RenderOpts) ([]byte, error)
- func (f GitHubActionsFormatter) SupportedOutputs() []Output
- type HTMLFormatter
- func (f HTMLFormatter) RenderChangelog(changes checker.Changes, opts RenderOpts, specInfoPair *load.SpecInfoPair) ([]byte, error)
- func (f HTMLFormatter) RenderChecks(Checks, RenderOpts) ([]byte, error)
- func (f HTMLFormatter) RenderDiff(diff *diff.Diff, opts RenderOpts) ([]byte, error)
- func (f HTMLFormatter) RenderFlatten(*openapi3.T, RenderOpts) ([]byte, error)
- func (f HTMLFormatter) RenderSummary(*diff.Diff, RenderOpts) ([]byte, error)
- func (f HTMLFormatter) SupportedOutputs() []Output
- type JSONFormatter
- func (f JSONFormatter) RenderChangelog(changes checker.Changes, opts RenderOpts, specInfoPair *load.SpecInfoPair) ([]byte, error)
- func (f JSONFormatter) RenderChecks(checks Checks, opts RenderOpts) ([]byte, error)
- func (f JSONFormatter) RenderDiff(diff *diff.Diff, opts RenderOpts) ([]byte, error)
- func (f JSONFormatter) RenderFlatten(spec *openapi3.T, opts RenderOpts) ([]byte, error)
- func (f JSONFormatter) RenderSummary(diff *diff.Diff, opts RenderOpts) ([]byte, error)
- func (f JSONFormatter) SupportedOutputs() []Output
- type JUnitFailure
- type JUnitFormatter
- func (f JUnitFormatter) RenderChangelog(changes checker.Changes, opts RenderOpts, specInfoPair *load.SpecInfoPair) ([]byte, error)
- func (f JUnitFormatter) RenderChecks(Checks, RenderOpts) ([]byte, error)
- func (f JUnitFormatter) RenderDiff(*diff.Diff, RenderOpts) ([]byte, error)
- func (f JUnitFormatter) RenderFlatten(*openapi3.T, RenderOpts) ([]byte, error)
- func (f JUnitFormatter) RenderSummary(*diff.Diff, RenderOpts) ([]byte, error)
- func (f JUnitFormatter) SupportedOutputs() []Output
- type JUnitTestCase
- type JUnitTestSuite
- type JUnitTestSuites
- type MarkupFormatter
- func (f MarkupFormatter) RenderChangelog(changes checker.Changes, opts RenderOpts, specInfoPair *load.SpecInfoPair) ([]byte, error)
- func (f MarkupFormatter) RenderChecks(Checks, RenderOpts) ([]byte, error)
- func (f MarkupFormatter) RenderDiff(diff *diff.Diff, opts RenderOpts) ([]byte, error)
- func (f MarkupFormatter) RenderFlatten(*openapi3.T, RenderOpts) ([]byte, error)
- func (f MarkupFormatter) RenderSummary(*diff.Diff, RenderOpts) ([]byte, error)
- func (f MarkupFormatter) SupportedOutputs() []Output
- type Output
- type RenderOpts
- type SingleLineFormatter
- func (f SingleLineFormatter) RenderChangelog(changes checker.Changes, opts RenderOpts, specInfoPair *load.SpecInfoPair) ([]byte, error)
- func (f SingleLineFormatter) RenderChecks(Checks, RenderOpts) ([]byte, error)
- func (f SingleLineFormatter) RenderDiff(*diff.Diff, RenderOpts) ([]byte, error)
- func (f SingleLineFormatter) RenderFlatten(*openapi3.T, RenderOpts) ([]byte, error)
- func (f SingleLineFormatter) RenderSummary(*diff.Diff, RenderOpts) ([]byte, error)
- func (f SingleLineFormatter) SupportedOutputs() []Output
- type TEXTFormatter
- func (f TEXTFormatter) RenderChangelog(changes checker.Changes, opts RenderOpts, specInfoPair *load.SpecInfoPair) ([]byte, error)
- func (f TEXTFormatter) RenderChecks(checks Checks, opts RenderOpts) ([]byte, error)
- func (f TEXTFormatter) RenderDiff(diff *diff.Diff, opts RenderOpts) ([]byte, error)
- func (f TEXTFormatter) RenderFlatten(*openapi3.T, RenderOpts) ([]byte, error)
- func (f TEXTFormatter) RenderSummary(*diff.Diff, RenderOpts) ([]byte, error)
- func (f TEXTFormatter) SupportedOutputs() []Output
- type TemplateData
- type YAMLFormatter
- func (f YAMLFormatter) RenderChangelog(changes checker.Changes, opts RenderOpts, specInfoPair *load.SpecInfoPair) ([]byte, error)
- func (f YAMLFormatter) RenderChecks(checks Checks, opts RenderOpts) ([]byte, error)
- func (f YAMLFormatter) RenderDiff(diff *diff.Diff, opts RenderOpts) ([]byte, error)
- func (f YAMLFormatter) RenderFlatten(spec *openapi3.T, opts RenderOpts) ([]byte, error)
- func (f YAMLFormatter) RenderSummary(diff *diff.Diff, opts RenderOpts) ([]byte, error)
- func (f YAMLFormatter) SupportedOutputs() []Output
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecuteHtmlTemplate ¶ added in v1.10.23
func ExecuteHtmlTemplate(tmpl *template.Template, changes ChangesByEndpoint, specInfoPair *load.SpecInfoPair) ([]byte, error)
func ExecuteTextTemplate ¶ added in v1.10.23
func ExecuteTextTemplate(tmpl *template.Template, changes ChangesByEndpoint, specInfoPair *load.SpecInfoPair) ([]byte, error)
func GetSupportedFormats ¶ added in v1.10.24
func GetSupportedFormats() []string
Types ¶
type Change ¶ added in v1.10.0
type Change struct { Id string `json:"id,omitempty" yaml:"id,omitempty"` Text string `json:"text,omitempty" yaml:"text,omitempty"` Comment string `json:"comment,omitempty" yaml:"comment,omitempty"` Level checker.Level `json:"level" yaml:"level"` Operation string `json:"operation,omitempty" yaml:"operation,omitempty"` OperationId string `json:"operationId,omitempty" yaml:"operationId,omitempty"` Path string `json:"path,omitempty" yaml:"path,omitempty"` Source string `json:"source,omitempty" yaml:"source,omitempty"` Section string `json:"section,omitempty" yaml:"section,omitempty"` IsBreaking bool `json:"-" yaml:"-"` Attributes map[string]any `json:"attributes,omitempty" yaml:"attributes,omitempty"` }
type ChangesByEndpoint ¶ added in v1.10.0
func GroupChanges ¶ added in v1.10.0
func GroupChanges(changes checker.Changes, l checker.Localizer) ChangesByEndpoint
type Formatter ¶
type Formatter interface { RenderDiff(diff *diff.Diff, opts RenderOpts) ([]byte, error) RenderSummary(diff *diff.Diff, opts RenderOpts) ([]byte, error) RenderChangelog(changes checker.Changes, opts RenderOpts, specInfoPair *load.SpecInfoPair) ([]byte, error) RenderChecks(checks Checks, opts RenderOpts) ([]byte, error) RenderFlatten(spec *openapi3.T, opts RenderOpts) ([]byte, error) SupportedOutputs() []Output }
Formatter is a common interface for output formatters
type FormatterOpts ¶
type FormatterOpts struct {
Language string
}
FormatterOpts can be used to pass properties to the formatter (e.g. colors)
func DefaultFormatterOpts ¶
func DefaultFormatterOpts() FormatterOpts
DefaultFormatterOpts returns the default formatter options (e.g. colors, CI mode, etc.)
type GitHubActionsFormatter ¶
type GitHubActionsFormatter struct { Localizer checker.Localizer // contains filtered or unexported fields }
func (GitHubActionsFormatter) RenderChangelog ¶
func (f GitHubActionsFormatter) RenderChangelog(changes checker.Changes, opts RenderOpts, specInfoPair *load.SpecInfoPair) ([]byte, error)
func (GitHubActionsFormatter) RenderChecks ¶
func (f GitHubActionsFormatter) RenderChecks(Checks, RenderOpts) ([]byte, error)
func (GitHubActionsFormatter) RenderDiff ¶
func (f GitHubActionsFormatter) RenderDiff(*diff.Diff, RenderOpts) ([]byte, error)
func (GitHubActionsFormatter) RenderFlatten ¶
func (f GitHubActionsFormatter) RenderFlatten(*openapi3.T, RenderOpts) ([]byte, error)
func (GitHubActionsFormatter) RenderSummary ¶
func (f GitHubActionsFormatter) RenderSummary(*diff.Diff, RenderOpts) ([]byte, error)
func (GitHubActionsFormatter) SupportedOutputs ¶
func (f GitHubActionsFormatter) SupportedOutputs() []Output
type HTMLFormatter ¶
func (HTMLFormatter) RenderChangelog ¶
func (f HTMLFormatter) RenderChangelog(changes checker.Changes, opts RenderOpts, specInfoPair *load.SpecInfoPair) ([]byte, error)
func (HTMLFormatter) RenderChecks ¶
func (f HTMLFormatter) RenderChecks(Checks, RenderOpts) ([]byte, error)
func (HTMLFormatter) RenderDiff ¶
func (f HTMLFormatter) RenderDiff(diff *diff.Diff, opts RenderOpts) ([]byte, error)
func (HTMLFormatter) RenderFlatten ¶
func (f HTMLFormatter) RenderFlatten(*openapi3.T, RenderOpts) ([]byte, error)
func (HTMLFormatter) RenderSummary ¶
func (f HTMLFormatter) RenderSummary(*diff.Diff, RenderOpts) ([]byte, error)
func (HTMLFormatter) SupportedOutputs ¶
func (f HTMLFormatter) SupportedOutputs() []Output
type JSONFormatter ¶
func (JSONFormatter) RenderChangelog ¶
func (f JSONFormatter) RenderChangelog(changes checker.Changes, opts RenderOpts, specInfoPair *load.SpecInfoPair) ([]byte, error)
func (JSONFormatter) RenderChecks ¶
func (f JSONFormatter) RenderChecks(checks Checks, opts RenderOpts) ([]byte, error)
func (JSONFormatter) RenderDiff ¶
func (f JSONFormatter) RenderDiff(diff *diff.Diff, opts RenderOpts) ([]byte, error)
func (JSONFormatter) RenderFlatten ¶
func (f JSONFormatter) RenderFlatten(spec *openapi3.T, opts RenderOpts) ([]byte, error)
func (JSONFormatter) RenderSummary ¶
func (f JSONFormatter) RenderSummary(diff *diff.Diff, opts RenderOpts) ([]byte, error)
func (JSONFormatter) SupportedOutputs ¶
func (f JSONFormatter) SupportedOutputs() []Output
type JUnitFailure ¶
type JUnitFormatter ¶
type JUnitFormatter struct { Localizer checker.Localizer // contains filtered or unexported fields }
func (JUnitFormatter) RenderChangelog ¶
func (f JUnitFormatter) RenderChangelog(changes checker.Changes, opts RenderOpts, specInfoPair *load.SpecInfoPair) ([]byte, error)
func (JUnitFormatter) RenderChecks ¶
func (f JUnitFormatter) RenderChecks(Checks, RenderOpts) ([]byte, error)
func (JUnitFormatter) RenderDiff ¶
func (f JUnitFormatter) RenderDiff(*diff.Diff, RenderOpts) ([]byte, error)
func (JUnitFormatter) RenderFlatten ¶
func (f JUnitFormatter) RenderFlatten(*openapi3.T, RenderOpts) ([]byte, error)
func (JUnitFormatter) RenderSummary ¶
func (f JUnitFormatter) RenderSummary(*diff.Diff, RenderOpts) ([]byte, error)
func (JUnitFormatter) SupportedOutputs ¶
func (f JUnitFormatter) SupportedOutputs() []Output
type JUnitTestCase ¶
type JUnitTestCase struct { Name string `xml:"name,attr"` Classname string `xml:"classname,attr"` Time string `xml:"time,attr"` Failure *JUnitFailure `xml:"failure,omitempty"` }
type JUnitTestSuite ¶
type JUnitTestSuites ¶
type JUnitTestSuites struct { XMLName xml.Name `xml:"testsuites"` TestSuites []JUnitTestSuite `xml:"testsuites"` }
type MarkupFormatter ¶ added in v1.10.23
type MarkupFormatter struct { Localizer checker.Localizer // contains filtered or unexported fields }
func (MarkupFormatter) RenderChangelog ¶ added in v1.10.23
func (f MarkupFormatter) RenderChangelog(changes checker.Changes, opts RenderOpts, specInfoPair *load.SpecInfoPair) ([]byte, error)
func (MarkupFormatter) RenderChecks ¶ added in v1.10.23
func (f MarkupFormatter) RenderChecks(Checks, RenderOpts) ([]byte, error)
func (MarkupFormatter) RenderDiff ¶ added in v1.10.23
func (f MarkupFormatter) RenderDiff(diff *diff.Diff, opts RenderOpts) ([]byte, error)
func (MarkupFormatter) RenderFlatten ¶ added in v1.10.23
func (f MarkupFormatter) RenderFlatten(*openapi3.T, RenderOpts) ([]byte, error)
func (MarkupFormatter) RenderSummary ¶ added in v1.10.23
func (f MarkupFormatter) RenderSummary(*diff.Diff, RenderOpts) ([]byte, error)
func (MarkupFormatter) SupportedOutputs ¶ added in v1.10.23
func (f MarkupFormatter) SupportedOutputs() []Output
type RenderOpts ¶
RenderOpts can be used to pass properties to the renderer method
func NewRenderOpts ¶ added in v1.10.0
func NewRenderOpts() RenderOpts
type SingleLineFormatter ¶ added in v1.10.0
type SingleLineFormatter struct { Localizer checker.Localizer // contains filtered or unexported fields }
func (SingleLineFormatter) RenderChangelog ¶ added in v1.10.0
func (f SingleLineFormatter) RenderChangelog(changes checker.Changes, opts RenderOpts, specInfoPair *load.SpecInfoPair) ([]byte, error)
func (SingleLineFormatter) RenderChecks ¶ added in v1.10.0
func (f SingleLineFormatter) RenderChecks(Checks, RenderOpts) ([]byte, error)
func (SingleLineFormatter) RenderDiff ¶ added in v1.10.0
func (f SingleLineFormatter) RenderDiff(*diff.Diff, RenderOpts) ([]byte, error)
func (SingleLineFormatter) RenderFlatten ¶ added in v1.10.0
func (f SingleLineFormatter) RenderFlatten(*openapi3.T, RenderOpts) ([]byte, error)
func (SingleLineFormatter) RenderSummary ¶ added in v1.10.0
func (f SingleLineFormatter) RenderSummary(*diff.Diff, RenderOpts) ([]byte, error)
func (SingleLineFormatter) SupportedOutputs ¶ added in v1.10.0
func (f SingleLineFormatter) SupportedOutputs() []Output
type TEXTFormatter ¶
func (TEXTFormatter) RenderChangelog ¶
func (f TEXTFormatter) RenderChangelog(changes checker.Changes, opts RenderOpts, specInfoPair *load.SpecInfoPair) ([]byte, error)
func (TEXTFormatter) RenderChecks ¶
func (f TEXTFormatter) RenderChecks(checks Checks, opts RenderOpts) ([]byte, error)
func (TEXTFormatter) RenderDiff ¶
func (f TEXTFormatter) RenderDiff(diff *diff.Diff, opts RenderOpts) ([]byte, error)
func (TEXTFormatter) RenderFlatten ¶
func (f TEXTFormatter) RenderFlatten(*openapi3.T, RenderOpts) ([]byte, error)
func (TEXTFormatter) RenderSummary ¶
func (f TEXTFormatter) RenderSummary(*diff.Diff, RenderOpts) ([]byte, error)
func (TEXTFormatter) SupportedOutputs ¶
func (f TEXTFormatter) SupportedOutputs() []Output
type TemplateData ¶ added in v1.9.6
type TemplateData struct { APIChanges ChangesByEndpoint BaseVersion string RevisionVersion string }
type YAMLFormatter ¶
func (YAMLFormatter) RenderChangelog ¶
func (f YAMLFormatter) RenderChangelog(changes checker.Changes, opts RenderOpts, specInfoPair *load.SpecInfoPair) ([]byte, error)
func (YAMLFormatter) RenderChecks ¶
func (f YAMLFormatter) RenderChecks(checks Checks, opts RenderOpts) ([]byte, error)
func (YAMLFormatter) RenderDiff ¶
func (f YAMLFormatter) RenderDiff(diff *diff.Diff, opts RenderOpts) ([]byte, error)
func (YAMLFormatter) RenderFlatten ¶
func (f YAMLFormatter) RenderFlatten(spec *openapi3.T, opts RenderOpts) ([]byte, error)
func (YAMLFormatter) RenderSummary ¶
func (f YAMLFormatter) RenderSummary(diff *diff.Diff, opts RenderOpts) ([]byte, error)
func (YAMLFormatter) SupportedOutputs ¶
func (f YAMLFormatter) SupportedOutputs() []Output
Click to show internal directories.
Click to hide internal directories.