cmd

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2026 License: Apache-2.0 Imports: 42 Imported by: 4 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// DefaultConfigFileName is the default name for the breaking rules config file
	DefaultConfigFileName = "changes-rules.yaml"
)

Variables

View Source
var (
	Version string
	Commit  string
	Date    string
)

Functions

func ApplyBreakingRulesConfig added in v0.0.91

func ApplyBreakingRulesConfig(config *model.BreakingRulesConfig)

ApplyBreakingRulesConfig sets the active breaking rules config in libopenapi. Thread-safe — delegates to internal/breakingrules which guards with a mutex.

func Execute

func Execute(version, commit, date string)

func ExtractGithubDetailsFromURL

func ExtractGithubDetailsFromURL(specURL *url.URL) (string, string, string, error)

func FlattenReport added in v0.0.54

func FlattenReport(report *model.Report) *model.FlatReport

func FlattenReportWithParameterNames added in v0.1.0

func FlattenReportWithParameterNames(report *model.Report, parameterNames map[string]string) *model.FlatReport

FlattenReportWithParameterNames flattens a report and normalizes parameter paths using the name map from the changerator (keyed by full parameter JSONPath, e.g., "$.paths['/pets'].get.parameters[0]" → "petId").

func GetConsoleCommand

func GetConsoleCommand() *cobra.Command

func GetHTMLReportCommand

func GetHTMLReportCommand() *cobra.Command

func GetMarkdownReportCommand added in v0.0.84

func GetMarkdownReportCommand() *cobra.Command

func GetReportCommand

func GetReportCommand() *cobra.Command

func GetSummaryCommand

func GetSummaryCommand() *cobra.Command

GetSummaryCommand returns the cobra command for the current summary command.

func GetVersionCommand added in v0.2.2

func GetVersionCommand() *cobra.Command

GetVersionCommand returns the cobra command for printing the raw build version.

func LoadBreakingRulesConfig added in v0.0.91

func LoadBreakingRulesConfig(configPath string) (*model.BreakingRulesConfig, error)

LoadBreakingRulesConfig loads a breaking rules configuration from the specified path. If configPath is empty, it searches default locations (current directory, then ~/.config). Returns nil config if no config is found in default locations (uses libopenapi defaults). Returns error if user-specified config path doesn't exist or has invalid YAML.

func PrintConfigError added in v0.0.91

func PrintConfigError(err error, palette terminal.Palette)

PrintConfigError prints a config error with nice formatting using lipgloss (no pterm).

func ResetBreakingRulesConfig added in v0.0.91

func ResetBreakingRulesConfig()

ResetBreakingRulesConfig resets the active breaking rules to libopenapi defaults. Thread-safe — delegates to internal/breakingrules which guards with a mutex.

Types

type ConfigParseError added in v0.0.91

type ConfigParseError struct {
	FilePath string
	Err      error
}

ConfigParseError represents a YAML parsing error with context

func (*ConfigParseError) Error added in v0.0.91

func (e *ConfigParseError) Error() string

func (*ConfigParseError) Unwrap added in v0.0.91

func (e *ConfigParseError) Unwrap() error

type ConfigValidationError added in v0.0.91

type ConfigValidationError struct {
	FilePath string
	Result   *model.ConfigValidationResult
}

ConfigValidationError represents validation errors in the config structure

func (*ConfigValidationError) Error added in v0.0.91

func (e *ConfigValidationError) Error() string

Jump to

Keyboard shortcuts

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