Documentation
¶
Index ¶
- Constants
- Variables
- func ApplyBreakingRulesConfig(config *model.BreakingRulesConfig)
- func Execute(version, commit, date string)
- func ExtractGithubDetailsFromURL(specURL *url.URL) (string, string, string, error)
- func FlattenReport(report *model.Report) *model.FlatReport
- func FlattenReportWithParameterNames(report *model.Report, parameterNames map[string]string) *model.FlatReport
- func GetConsoleCommand() *cobra.Command
- func GetHTMLReportCommand() *cobra.Command
- func GetMarkdownReportCommand() *cobra.Command
- func GetReportCommand() *cobra.Command
- func GetSummaryCommand() *cobra.Command
- func LoadBreakingRulesConfig(configPath string) (*model.BreakingRulesConfig, error)
- func PrintConfigError(err error, palette terminal.Palette)
- func ResetBreakingRulesConfig()
- type ConfigParseError
- type ConfigValidationError
Constants ¶
const (
// DefaultConfigFileName is the default name for the breaking rules config file
DefaultConfigFileName = "changes-rules.yaml"
)
Variables ¶
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 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 GetHTMLReportCommand ¶
func GetMarkdownReportCommand ¶ added in v0.0.84
func GetReportCommand ¶
func GetSummaryCommand ¶
GetSummaryCommand returns the cobra command for the current summary command.
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
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
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