checker

package
v0.0.0-...-361bbb7 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package checker finds breaking-changes accoss openapi specifications.

Index

Constants

View Source
const (
	EndpointReactivatedId      = "endpoint-reactivated"
	APIDeprecatedSunsetParseId = "api-deprecated-sunset-parse"
	ParseErrorId               = "parsing-error"
	APISunsetDateTooSmallId    = "api-sunset-date-too-small"
	EndpointDeprecatedId       = "endpoint-deprecated"
)
View Source
const (
	APIOperationIdRemovedId = "api-operation-id-removed"
	APIOperationIdAddId     = "api-operation-id-added"
)
View Source
const (
	APIPathRemovedWithoutDeprecationId = "api-path-removed-without-deprecation"
	APIPathSunsetParseId               = "api-path-sunset-parse"
	APIPathRemovedBeforeSunsetId       = "api-path-removed-before-sunset"
	APIRemovedWithoutDeprecationId     = "api-removed-without-deprecation"
	APIRemovedBeforeSunsetId           = "api-removed-before-sunset"
)
View Source
const (
	APISecurityRemovedCheckId       = "api-security-removed"
	APISecurityAddedCheckId         = "api-security-added"
	APISecurityScopeAddedId         = "api-security-scope-added"
	APISecurityScopeRemovedId       = "api-security-scope-removed"
	APIGlobalSecurityRemovedCheckId = "api-global-security-removed"
	APIGlobalSecurityAddedCheckId   = "api-global-security-added"
	APIGlobalSecurityScopeAddedId   = "api-global-security-scope-added"
	APIGlobalSecurityScopeRemovedId = "api-global-security-scope-removed"
)
View Source
const (
	APISunsetDeletedId             = "sunset-deleted"
	APISunsetDateChangedTooSmallId = "api-sunset-date-changed-too-small"
)
View Source
const (
	STABILITY_DRAFT  = "draft"
	STABILITY_ALPHA  = "alpha"
	STABILITY_BETA   = "beta"
	STABILITY_STABLE = "stable"
)
View Source
const (
	APITagRemovedId = "api-tag-removed"
	APITagAddedId   = "api-tag-added"
)
View Source
const (
	APISchemasRemovedId = "api-schema-removed"
	ComponentSchemas    = "schemas"
)
View Source
const (
	APIComponentsSecurityRemovedId                  = "api-security-component-removed"
	APIComponentsSecurityAddedId                    = "api-security-component-added"
	APIComponentsSecurityComponentOauthUrlUpdatedId = "api-security-component-oauth-url-changed"
	APIComponentsSecurityTypeUpdatedId              = "api-security-component-type-changed"
	APIComponentsSecurityOauthTokenUrlUpdatedId     = "api-security-component-oauth-token-url-changed"
	APIComponentSecurityOauthScopeAddedId           = "api-security-component-oauth-scope-added"
	APIComponentSecurityOauthScopeRemovedId         = "api-security-component-oauth-scope-removed"
	APIComponentSecurityOauthScopeUpdatedId         = "api-security-component-oauth-scope-changed"
)
View Source
const (
	NewRequiredRequestDefaultParameterToExistingPathId = "new-required-request-default-parameter-to-existing-path"
	NewOptionalRequestDefaultParameterToExistingPathId = "new-optional-request-default-parameter-to-existing-path"
)
View Source
const (
	NewRequiredRequestParameterId = "new-required-request-parameter"
	NewOptionalRequestParameterId = "new-optional-request-parameter"
)
View Source
const (
	RequestBodyMediaTypeAddedId   = "request-body-media-type-added"
	RequestBodyMediaTypeRemovedId = "request-body-media-type-removed"
)
View Source
const (
	RequestBodyBecameOptionalId = "request-body-became-optional"
	RequestBodyBecameRequiredId = "request-body-became-required"
)
View Source
const (
	RequestBodyDiscriminatorAddedId                   = "request-body-discriminator-added"
	RequestBodyDiscriminatorRemovedId                 = "request-body-discriminator-removed"
	RequestBodyDiscriminatorPropertyNameChangedId     = "request-body-discriminator-property-name-changed"
	RequestBodyDiscriminatorMappingAddedId            = "request-body-discriminator-mapping-added"
	RequestBodyDiscriminatorMappingDeletedId          = "request-body-discriminator-mapping-deleted"
	RequestBodyDiscriminatorMappingChangedId          = "request-body-discriminator-mapping-changed"
	RequestPropertyDiscriminatorAddedId               = "request-property-discriminator-added"
	RequestPropertyDiscriminatorRemovedId             = "request-property-discriminator-removed"
	RequestPropertyDiscriminatorPropertyNameChangedId = "request-property-discriminator-property-name-changed"
	RequestPropertyDiscriminatorMappingAddedId        = "request-property-discriminator-mapping-added"
	RequestPropertyDiscriminatorMappingDeletedId      = "request-property-discriminator-mapping-deleted"
	RequestPropertyDiscriminatorMappingChangedId      = "request-property-discriminator-mapping-changed"
)
View Source
const (
	RequestParameterEnumValueAddedId   = "request-parameter-enum-value-added"
	RequestParameterEnumValueRemovedId = "request-parameter-enum-value-removed"
)
View Source
const (
	RequestParameterPatternAddedId   = "request-parameter-pattern-added"
	RequestParameterPatternRemovedId = "request-parameter-pattern-removed"
	RequestParameterPatternChangedId = "request-parameter-pattern-changed"
	PatternChangedCommentId          = "pattern-changed-warn-comment"
)
View Source
const (
	RequestParameterBecomeRequiredId = "request-parameter-became-required"
	RequestParameterBecomeOptionalId = "request-parameter-became-optional"
)
View Source
const (
	UnparsableParameterFromXExtensibleEnumId      = "unparseable-parameter-from-x-extensible-enum"
	UnparsableParameterToXExtensibleEnumId        = "unparseable-parameter-to-x-extensible-enum"
	RequestParameterXExtensibleEnumValueRemovedId = "request-parameter-x-extensible-enum-value-removed"
)
View Source
const (
	RequestParameterDefaultValueChangedId = "request-parameter-default-value-changed"
	RequestParameterDefaultValueAddedId   = "request-parameter-default-value-added"
	RequestParameterDefaultValueRemovedId = "request-parameter-default-value-removed"
)
View Source
const (
	RequestParameterMaxItemsIncreasedId = "request-parameter-max-items-increased"
	RequestParameterMaxItemsDecreasedId = "request-parameter-max-items-decreased"
)
View Source
const (
	RequestParameterMaxLengthDecreasedId = "request-parameter-max-length-decreased"
	RequestParameterMaxLengthIncreasedId = "request-parameter-max-length-increased"
)
View Source
const (
	RequestParameterMaxDecreasedId = "request-parameter-max-decreased"
	RequestParameterMaxIncreasedId = "request-parameter-max-increased"
)
View Source
const (
	RequestParameterMinItemsIncreasedId = "request-parameter-min-items-increased"
	RequestParameterMinItemsDecreasedId = "request-parameter-min-items-decreased"
)
View Source
const (
	RequestParameterMinLengthIncreasedId = "request-parameter-min-length-increased"
	RequestParameterMinLengthDecreasedId = "request-parameter-min-length-decreased"
)
View Source
const (
	RequestParameterMinIncreasedId = "request-parameter-min-increased"
	RequestParameterMinDecreasedId = "request-parameter-min-decreased"
)
View Source
const (
	RequestBodyAllOfAddedId       = "request-body-all-of-added"
	RequestBodyAllOfRemovedId     = "request-body-all-of-removed"
	RequestPropertyAllOfAddedId   = "request-property-all-of-added"
	RequestPropertyAllOfRemovedId = "request-property-all-of-removed"
)
View Source
const (
	RequestBodyAnyOfAddedId       = "request-body-any-of-added"
	RequestBodyAnyOfRemovedId     = "request-body-any-of-removed"
	RequestPropertyAnyOfAddedId   = "request-property-any-of-added"
	RequestPropertyAnyOfRemovedId = "request-property-any-of-removed"
)
View Source
const (
	RequestBodyBecomeNotNullableId     = "request-body-became-not-nullable"
	RequestBodyBecomeNullableId        = "request-body-became-nullable"
	RequestPropertyBecomeNotNullableId = "request-property-became-not-nullable"
	RequestPropertyBecomeNullableId    = "request-property-became-nullable"
)
View Source
const (
	RequestBodyDefaultValueAddedId       = "request-body-default-value-added"
	RequestBodyDefaultValueRemovedId     = "request-body-default-value-removed"
	RequestBodyDefaultValueChangedId     = "request-body-default-value-changed"
	RequestPropertyDefaultValueAddedId   = "request-property-default-value-added"
	RequestPropertyDefaultValueRemovedId = "request-property-default-value-removed"
	RequestPropertyDefaultValueChangedId = "request-property-default-value-changed"
)
View Source
const (
	RequestPropertyEnumValueRemovedId = "request-property-enum-value-removed"
	RequestPropertyEnumValueAddedId   = "request-property-enum-value-added"
)
View Source
const (
	RequestBodyMaxLengthSetId     = "request-body-max-length-set"
	RequestPropertyMaxLengthSetId = "request-property-max-length-set"
)
View Source
const (
	RequestBodyMaxLengthDecreasedId     = "request-body-max-length-decreased"
	RequestBodyMaxLengthIncreasedId     = "request-body-max-length-increased"
	RequestPropertyMaxLengthDecreasedId = "request-property-max-length-decreased"
	RequestPropertyMaxLengthIncreasedId = "request-property-max-length-increased"
)
View Source
const (
	RequestBodyMaxSetId     = "request-body-max-set"
	RequestPropertyMaxSetId = "request-property-max-set"
)
View Source
const (
	RequestBodyMaxDecreasedId     = "request-body-max-decreased"
	RequestBodyMaxIncreasedId     = "request-body-max-increased"
	RequestPropertyMaxDecreasedId = "request-property-max-decreased"
	RequestPropertyMaxIncreasedId = "request-property-max-increased"
)
View Source
const (
	RequestBodyMinItemsIncreasedId     = "request-body-min-items-increased"
	RequestPropertyMinItemsIncreasedId = "request-property-min-items-increased"
)
View Source
const (
	RequestBodyMinItemsSetId     = "request-body-min-items-set"
	RequestPropertyMinItemsSetId = "request-property-min-items-set"
)
View Source
const (
	RequestBodyMinLengthIncreasedId     = "request-body-min-length-increased"
	RequestBodyMinLengthDecreasedId     = "request-body-min-length-decreased"
	RequestPropertyMinLengthIncreasedId = "request-property-min-length-increased"
	RequestPropertyMinLengthDecreasedId = "request-property-min-length-decreased"
)
View Source
const (
	RequestBodyMinSetId     = "request-body-min-set"
	RequestPropertyMinSetId = "request-property-min-set"
)
View Source
const (
	RequestBodyMinIncreasedId     = "request-body-min-increased"
	RequestBodyMinDecreasedId     = "request-body-min-decreased"
	RequestPropertyMinIncreasedId = "request-property-min-increased"
	RequestPropertyMinDecreasedId = "request-property-min-decreased"
)
View Source
const (
	RequestBodyOneOfAddedId       = "request-body-one-of-added"
	RequestBodyOneOfRemovedId     = "request-body-one-of-removed"
	RequestPropertyOneOfAddedId   = "request-property-one-of-added"
	RequestPropertyOneOfRemovedId = "request-property-one-of-removed"
)
View Source
const (
	RequestPropertyPatternRemovedId = "request-property-pattern-removed"
	RequestPropertyPatternAddedId   = "request-property-pattern-added"
	RequestPropertyPatternChangedId = "request-property-pattern-changed"
)
View Source
const (
	RequestPropertyBecameRequiredId = "request-property-became-required"
	RequestPropertyBecameOptionalId = "request-property-became-optional"
)
View Source
const (
	RequestBodyTypeChangedId     = "request-body-type-changed"
	RequestPropertyTypeChangedId = "request-property-type-changed"
)
View Source
const (
	RequestPropertyRemovedId     = "request-property-removed"
	NewRequiredRequestPropertyId = "new-required-request-property"
	NewOptionalRequestPropertyId = "new-optional-request-property"
)
View Source
const (
	RequestOptionalPropertyBecameNonWriteOnlyCheckId = "request-optional-property-became-not-write-only"
	RequestOptionalPropertyBecameWriteOnlyCheckId    = "request-optional-property-became-write-only"
	RequestOptionalPropertyBecameReadOnlyCheckId     = "request-optional-property-became-read-only"
	RequestOptionalPropertyBecameNonReadOnlyCheckId  = "request-optional-property-became-not-read-only"
	RequestRequiredPropertyBecameNonWriteOnlyCheckId = "request-required-property-became-not-write-only"
	RequestRequiredPropertyBecameWriteOnlyCheckId    = "request-required-property-became-write-only"
	RequestRequiredPropertyBecameReadOnlyCheckId     = "request-required-property-became-read-only"
	RequestRequiredPropertyBecameNonReadOnlyCheckId  = "request-required-property-became-not-read-only"
)
View Source
const (
	UnparseablePropertyFromXExtensibleEnumId     = "unparseable-property-from-x-extensible-enum"
	UnparseablePropertyToXExtensibleEnumId       = "unparseable-property-to-x-extensible-enum"
	RequestPropertyXExtensibleEnumValueRemovedId = "request-property-x-extensible-enum-value-removed"
)
View Source
const (
	ResponseBodyDiscriminatorAddedId                   = "response-body-discriminator-added"
	ResponseBodyDiscriminatorRemovedId                 = "response-body-discriminator-removed"
	ResponseBodyDiscriminatorPropertyNameChangedId     = "response-body-discriminator-property-name-changed"
	ResponseBodyDiscriminatorMappingAddedId            = "response-body-discriminator-mapping-added"
	ResponseBodyDiscriminatorMappingDeletedId          = "response-body-discriminator-mapping-deleted"
	ResponseBodyDiscriminatorMappingChangedId          = "response-body-discriminator-mapping-changed"
	ResponsePropertyDiscriminatorAddedId               = "response-property-discriminator-added"
	ResponsePropertyDiscriminatorRemovedId             = "response-property-discriminator-removed"
	ResponsePropertyDiscriminatorPropertyNameChangedId = "response-property-discriminator-property-name-changed"
	ResponsePropertyDiscriminatorMappingAddedId        = "response-property-discriminator-mapping-added"
	ResponsePropertyDiscriminatorMappingDeletedId      = "response-property-discriminator-mapping-deleted"
	ResponsePropertyDiscriminatorMappingChangedId      = "response-property-discriminator-mapping-changed"
)
View Source
const (
	RequiredResponseHeaderRemovedId = "required-response-header-removed"
	OptionalResponseHeaderRemovedId = "optional-response-header-removed"
)
View Source
const (
	ResponseMediaTypeRemovedId = "response-media-type-removed"
	ResponseMediaTypeAddedId   = "response-media-type-added"
)
View Source
const (
	ResponseOptionalPropertyRemovedId          = "response-optional-property-removed"
	ResponseOptionalWriteOnlyPropertyRemovedId = "response-optional-write-only-property-removed"
	ResponseOptionalPropertyAddedId            = "response-optional-property-added"
	ResponseOptionalWriteOnlyPropertyAddedId   = "response-optional-write-only-property-added"
)
View Source
const (
	ResponseOptionalPropertyBecameNonWriteOnlyId = "response-optional-property-became-not-write-only"
	ResponseOptionalPropertyBecameWriteOnlyId    = "response-optional-property-became-write-only"
	ResponseOptionalPropertyBecameReadOnlyId     = "response-optional-property-became-read-only"
	ResponseOptionalPropertyBecameNonReadOnlyId  = "response-optional-property-became-not-read-only"
)
View Source
const (
	ResponsePropertyPatternAddedId   = "response-property-pattern-added"
	ResponsePropertyPatternChangedId = "response-property-pattern-changed"
	ResponsePropertyPatternRemovedId = "response-property-pattern-removed"
)
View Source
const (
	ResponseBodyAllOfAddedId       = "response-body-all-of-added"
	ResponseBodyAllOfRemovedId     = "response-body-all-of-removed"
	ResponsePropertyAllOfAddedId   = "response-property-all-of-added"
	ResponsePropertyAllOfRemovedId = "response-property-all-of-removed"
)
View Source
const (
	ResponseBodyAnyOfAddedId       = "response-body-any-of-added"
	ResponseBodyAnyOfRemovedId     = "response-body-any-of-removed"
	ResponsePropertyAnyOfAddedId   = "response-property-any-of-added"
	ResponsePropertyAnyOfRemovedId = "response-property-any-of-removed"
)
View Source
const (
	ResponsePropertyBecameNullableId = "response-property-became-nullable"
	ResponseBodyBecameNullableId     = "response-body-became-nullable"
)
View Source
const (
	ResponsePropertyBecameOptionalId          = "response-property-became-optional"
	ResponseWriteOnlyPropertyBecameOptionalId = "response-write-only-property-became-optional"
)
View Source
const (
	ResponsePropertyBecameRequiredId          = "response-property-became-required"
	ResponseWriteOnlyPropertyBecameRequiredId = "response-write-only-property-became-required"
)
View Source
const (
	ResponseBodyDefaultValueAddedId       = "response-body-default-value-added"
	ResponseBodyDefaultValueRemovedId     = "response-body-default-value-removed"
	ResponseBodyDefaultValueChangedId     = "response-body-default-value-changed"
	ResponsePropertyDefaultValueAddedId   = "response-property-default-value-added"
	ResponsePropertyDefaultValueRemovedId = "response-property-default-value-removed"
	ResponsePropertyDefaultValueChangedId = "response-property-default-value-changed"
)
View Source
const (
	ResponsePropertyEnumValueAddedId          = "response-property-enum-value-added"
	ResponseWriteOnlyPropertyEnumValueAddedId = "response-write-only-property-enum-value-added"
)
View Source
const (
	ResponseBodyMaxIncreasedId     = "response-body-max-increased"
	ResponsePropertyMaxIncreasedId = "response-property-max-increased"
)
View Source
const (
	ResponseBodyMaxLengthIncreasedId     = "response-body-max-length-increased"
	ResponsePropertyMaxLengthIncreasedId = "response-property-max-length-increased"
)
View Source
const (
	ResponseBodyMaxLengthUnsetId     = "response-body-max-length-unset"
	ResponsePropertyMaxLengthUnsetId = "response-property-max-length-unset"
)
View Source
const (
	ResponseBodyMinDecreasedId     = "response-body-min-decreased"
	ResponsePropertyMinDecreasedId = "response-property-min-decreased"
)
View Source
const (
	ResponseBodyMinItemsDecreasedId     = "response-body-min-items-decreased"
	ResponsePropertyMinItemsDecreasedId = "response-property-min-items-decreased"
)
View Source
const (
	ResponseBodyMinItemsUnsetId     = "response-body-min-items-unset"
	ResponsePropertyMinItemsUnsetId = "response-property-min-items-unset"
)
View Source
const (
	ResponseBodyMinLengthDecreasedId     = "response-body-min-length-decreased"
	ResponsePropertyMinLengthDecreasedId = "response-property-min-length-decreased"
)
View Source
const (
	ResponseBodyOneOfAddedId       = "response-body-one-of-added"
	ResponseBodyOneOfRemovedId     = "response-body-one-of-removed"
	ResponsePropertyOneOfAddedId   = "response-property-one-of-added"
	ResponsePropertyOneOfRemovedId = "response-property-one-of-removed"
)
View Source
const (
	ResponseBodyTypeChangedId     = "response-body-type-changed"
	ResponsePropertyTypeChangedId = "response-property-type-changed"
)
View Source
const (
	ResponseRequiredPropertyRemovedId          = "response-required-property-removed"
	ResponseRequiredWriteOnlyPropertyRemovedId = "response-required-write-only-property-removed"
	ResponseRequiredPropertyAddedId            = "response-required-property-added"
	ResponseRequiredWriteOnlyPropertyAddedId   = "response-required-write-only-property-added"
)
View Source
const (
	ResponseRequiredPropertyBecameNonWriteOnlyId = "response-required-property-became-not-write-only"
	ResponseRequiredPropertyBecameWriteOnlyId    = "response-required-property-became-write-only"
	ResponseRequiredPropertyBecameReadOnlyId     = "response-required-property-became-read-only"
	ResponseRequiredPropertyBecameNonReadOnlyId  = "response-required-property-became-not-read-only"
)
View Source
const (
	ResponseSuccessStatusRemovedId    = "response-success-status-removed"
	ResponseNonSuccessStatusRemovedId = "response-non-success-status-removed"
	ResponseSuccessStatusAddedId      = "response-success-status-added"
	ResponseNonSuccessStatusAddedId   = "response-non-success-status-added"
)
View Source
const (
	BetaDeprecationDays   = 31
	StableDeprecationDays = 180
)
View Source
const (
	APIStabilityDecreasedId = "api-stability-decreased"
)
View Source
const (
	AddedRequiredRequestBodyId = "added-required-request-body"
)
View Source
const ComponentSecuritySchemes = "securitySchemes"
View Source
const (
	EndpointAddedId = "endpoint-added"
)
View Source
const (
	NewRequestPathParameterId = "new-request-path-parameter"
)
View Source
const (
	NewRequiredRequestHeaderPropertyId = "new-required-request-header-property"
)
View Source
const (
	RequestBodyBecameEnumId = "request-body-became-enum"
)
View Source
const (
	RequestBodyEnumValueRemovedId = "request-body-enum-value-removed"
)
View Source
const (
	RequestHeaderPropertyBecameEnumId = "request-header-property-became-enum"
)
View Source
const (
	RequestHeaderPropertyBecameRequiredId = "request-header-property-became-required"
)
View Source
const (
	RequestParameterBecameEnumId = "request-parameter-became-enum"
)
View Source
const (
	RequestParameterMaxLengthSetId = "request-parameter-max-length-set"
)
View Source
const (
	RequestParameterMaxSetId = "request-parameter-max-set"
)
View Source
const (
	RequestParameterMinItemsSetId = "request-parameter-min-items-set"
)
View Source
const (
	RequestParameterMinSetId = "request-parameter-min-set"
)
View Source
const (
	RequestParameterRemovedId = "request-parameter-removed"
)
View Source
const (
	RequestParameterTypeChangedId = "request-parameter-type-changed"
)
View Source
const (
	RequestPropertyBecameEnumId = "request-property-became-enum"
)
View Source
const (
	ResponseHeaderBecameOptionalId = "response-header-became-optional"
)
View Source
const (
	ResponseMediaTypeEnumValueRemovedId = "response-mediatype-enum-value-removed"
)
View Source
const (
	ResponsePropertyEnumValueRemovedId = "response-property-enum-value-removed"
)

Variables

This section is empty.

Functions

func CheckAddedPropertiesDiff

func CheckAddedPropertiesDiff(schemaDiff *diff.SchemaDiff, processor func(propertyPath string, propertyName string, propertyItem *openapi3.Schema, propertyParentDiff *diff.SchemaDiff))

func CheckDeletedPropertiesDiff

func CheckDeletedPropertiesDiff(schemaDiff *diff.SchemaDiff, processor func(propertyPath string, propertyName string, propertyItem *openapi3.Schema, propertyParentDiff *diff.SchemaDiff))

func CheckModifiedPropertiesDiff

func CheckModifiedPropertiesDiff(schemaDiff *diff.SchemaDiff, processor func(propertyPath string, propertyName string, propertyItem *diff.SchemaDiff, propertyParentItem *diff.SchemaDiff))

func GetOptionalChecks

func GetOptionalChecks() []string

func IsDecreased

func IsDecreased(from interface{}, to interface{}) bool

func IsDecreasedValue

func IsDecreasedValue(diff *diff.ValueDiff) bool

func IsIncreased

func IsIncreased(from interface{}, to interface{}) bool

func IsIncreasedValue

func IsIncreasedValue(diff *diff.ValueDiff) bool

func LevelOverrides

func LevelOverrides(includeChecks utils.StringList) map[string]Level

func SetPipedOutput

func SetPipedOutput(val *bool) *bool

Types

type ApiChange

type ApiChange struct {
	Id          string `json:"id,omitempty" yaml:"id,omitempty"`
	Args        []any
	Comment     string `json:"comment,omitempty" yaml:"comment,omitempty"`
	Level       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"`

	SourceFile      string `json:"-" yaml:"-"`
	SourceLine      int    `json:"-" yaml:"-"`
	SourceLineEnd   int    `json:"-" yaml:"-"`
	SourceColumn    int    `json:"-" yaml:"-"`
	SourceColumnEnd int    `json:"-" yaml:"-"`
}

ApiChange represnts a change in the Paths Section of an OpenAPI spec

func (ApiChange) GetArgs

func (c ApiChange) GetArgs() []any

func (ApiChange) GetComment

func (c ApiChange) GetComment(l Localizer) string

func (ApiChange) GetId

func (c ApiChange) GetId() string

func (ApiChange) GetLevel

func (c ApiChange) GetLevel() Level

func (ApiChange) GetOperation

func (c ApiChange) GetOperation() string

func (ApiChange) GetOperationId

func (c ApiChange) GetOperationId() string

func (ApiChange) GetPath

func (c ApiChange) GetPath() string

func (ApiChange) GetSection

func (c ApiChange) GetSection() string

func (ApiChange) GetSource

func (c ApiChange) GetSource() string

func (ApiChange) GetSourceColumn

func (c ApiChange) GetSourceColumn() int

func (ApiChange) GetSourceColumnEnd

func (c ApiChange) GetSourceColumnEnd() int

func (ApiChange) GetSourceFile

func (c ApiChange) GetSourceFile() string

func (ApiChange) GetSourceLine

func (c ApiChange) GetSourceLine() int

func (ApiChange) GetSourceLineEnd

func (c ApiChange) GetSourceLineEnd() int

func (ApiChange) GetText

func (c ApiChange) GetText(l Localizer) string

func (ApiChange) GetUncolorizedText

func (c ApiChange) GetUncolorizedText(l Localizer) string

func (ApiChange) IsBreaking

func (c ApiChange) IsBreaking() bool

func (ApiChange) MatchIgnore

func (c ApiChange) MatchIgnore(ignorePath, ignoreLine string, l Localizer) bool

func (ApiChange) MultiLineError

func (c ApiChange) MultiLineError(l Localizer, colorMode ColorMode) string

func (ApiChange) SingleLineError

func (c ApiChange) SingleLineError(l Localizer, colorMode ColorMode) string

type BCDiff

type BCDiff struct {
	diff.Diff
}

func (*BCDiff) AddModifiedOperation

func (d *BCDiff) AddModifiedOperation(path string, operation string) *diff.MethodDiff

func (*BCDiff) AddModifiedParameter

func (diffBC *BCDiff) AddModifiedParameter(path string, operation string, paramLocation string, paramName string) *diff.ParameterDiff

func (*BCDiff) AddModifiedPath

func (d *BCDiff) AddModifiedPath(path string) *diff.PathDiff

func (*BCDiff) AddRequestPropertiesDiff

func (diffBC *BCDiff) AddRequestPropertiesDiff(path string, operation string, mediaType string) *diff.SchemasDiff

type BackwardCompatibilityCheck

type BackwardCompatibilityCheck func(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

type BackwardCompatibilityRule

type BackwardCompatibilityRule struct {
	Id          string
	Level       Level
	Description string
	Required    bool
	Handler     BackwardCompatibilityCheck `json:"-" yaml:"-"`
}

func GetAllRules

func GetAllRules() []BackwardCompatibilityRule

func GetOptionalRules

func GetOptionalRules() []BackwardCompatibilityRule

func GetRequiredRules

func GetRequiredRules() []BackwardCompatibilityRule

type Change

type Change interface {
	GetSection() string
	IsBreaking() bool
	GetId() string
	GetText(l Localizer) string
	GetArgs() []any
	GetUncolorizedText(l Localizer) string
	GetComment(l Localizer) string
	GetLevel() Level
	GetOperation() string
	GetOperationId() string
	GetPath() string
	GetSource() string
	GetSourceFile() string
	GetSourceLine() int
	GetSourceLineEnd() int
	GetSourceColumn() int
	GetSourceColumnEnd() int
	MatchIgnore(ignorePath, ignoreLine string, l Localizer) bool
	SingleLineError(l Localizer, colorMode ColorMode) string
	MultiLineError(l Localizer, colorMode ColorMode) string
}

type Changes

type Changes []Change

func APIAddedCheck

func APIAddedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func APIComponentsSchemaRemovedCheck

func APIComponentsSchemaRemovedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func APIComponentsSecurityUpdatedCheck

func APIComponentsSecurityUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func APIDeprecationCheck

func APIDeprecationCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func APIOperationIdUpdatedCheck

func APIOperationIdUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func APIRemovedCheck

func APIRemovedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func APISecurityUpdatedCheck

func APISecurityUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func APISunsetChangedCheck

func APISunsetChangedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func APITagUpdatedCheck

func APITagUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func AddedRequiredRequestBodyCheck

func AddedRequiredRequestBodyCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func CheckBackwardCompatibility

func CheckBackwardCompatibility(config *Config, diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap) Changes

func CheckBackwardCompatibilityUntilLevel

func CheckBackwardCompatibilityUntilLevel(config *Config, diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, level Level) Changes

func NewRequestNonPathDefaultParameterCheck

func NewRequestNonPathDefaultParameterCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func NewRequestNonPathParameterCheck

func NewRequestNonPathParameterCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func NewRequestPathParameterCheck

func NewRequestPathParameterCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func NewRequiredRequestHeaderPropertyCheck

func NewRequiredRequestHeaderPropertyCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ProcessIgnoredBackwardCompatibilityErrors

func ProcessIgnoredBackwardCompatibilityErrors(level Level, errs Changes, ignoreFile string, l Localizer) (Changes, error)

func RequestBodyBecameEnumCheck

func RequestBodyBecameEnumCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestBodyEnumValueRemovedCheck

func RequestBodyEnumValueRemovedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestBodyMediaTypeChangedCheck

func RequestBodyMediaTypeChangedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestBodyRequiredUpdatedCheck

func RequestBodyRequiredUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestDiscriminatorUpdatedCheck

func RequestDiscriminatorUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestHeaderPropertyBecameEnumCheck

func RequestHeaderPropertyBecameEnumCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestHeaderPropertyBecameRequiredCheck

func RequestHeaderPropertyBecameRequiredCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestParameterBecameEnumCheck

func RequestParameterBecameEnumCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestParameterDefaultValueChangedCheck

func RequestParameterDefaultValueChangedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestParameterEnumValueUpdatedCheck

func RequestParameterEnumValueUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestParameterMaxItemsUpdatedCheck

func RequestParameterMaxItemsUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestParameterMaxLengthSetCheck

func RequestParameterMaxLengthSetCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestParameterMaxLengthUpdatedCheck

func RequestParameterMaxLengthUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestParameterMaxSetCheck

func RequestParameterMaxSetCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestParameterMaxUpdatedCheck

func RequestParameterMaxUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestParameterMinItemsSetCheck

func RequestParameterMinItemsSetCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestParameterMinItemsUpdatedCheck

func RequestParameterMinItemsUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestParameterMinLengthUpdatedCheck

func RequestParameterMinLengthUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestParameterMinSetCheck

func RequestParameterMinSetCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestParameterMinUpdatedCheck

func RequestParameterMinUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestParameterPatternAddedOrChangedCheck

func RequestParameterPatternAddedOrChangedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestParameterRemovedCheck

func RequestParameterRemovedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestParameterRequiredValueUpdatedCheck

func RequestParameterRequiredValueUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestParameterTypeChangedCheck

func RequestParameterTypeChangedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestParameterXExtensibleEnumValueRemovedCheck

func RequestParameterXExtensibleEnumValueRemovedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyAllOfUpdatedCheck

func RequestPropertyAllOfUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyAnyOfUpdatedCheck

func RequestPropertyAnyOfUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyBecameEnumCheck

func RequestPropertyBecameEnumCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyBecameNotNullableCheck

func RequestPropertyBecameNotNullableCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyDefaultValueChangedCheck

func RequestPropertyDefaultValueChangedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyEnumValueUpdatedCheck

func RequestPropertyEnumValueUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyMaxDecreasedCheck

func RequestPropertyMaxDecreasedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyMaxLengthSetCheck

func RequestPropertyMaxLengthSetCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyMaxLengthUpdatedCheck

func RequestPropertyMaxLengthUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyMaxSetCheck

func RequestPropertyMaxSetCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyMinIncreasedCheck

func RequestPropertyMinIncreasedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyMinItemsIncreasedCheck

func RequestPropertyMinItemsIncreasedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyMinItemsSetCheck

func RequestPropertyMinItemsSetCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyMinLengthUpdatedCheck

func RequestPropertyMinLengthUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyMinSetCheck

func RequestPropertyMinSetCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyOneOfUpdatedCheck

func RequestPropertyOneOfUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyPatternUpdatedCheck

func RequestPropertyPatternUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyRequiredUpdatedCheck

func RequestPropertyRequiredUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyTypeChangedCheck

func RequestPropertyTypeChangedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyUpdatedCheck

func RequestPropertyUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyWriteOnlyReadOnlyCheck

func RequestPropertyWriteOnlyReadOnlyCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func RequestPropertyXExtensibleEnumValueRemovedCheck

func RequestPropertyXExtensibleEnumValueRemovedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponseDiscriminatorUpdatedCheck

func ResponseDiscriminatorUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponseHeaderBecameOptionalCheck

func ResponseHeaderBecameOptionalCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponseHeaderRemovedCheck

func ResponseHeaderRemovedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponseMediaTypeEnumValueRemovedCheck

func ResponseMediaTypeEnumValueRemovedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponseMediaTypeUpdatedCheck

func ResponseMediaTypeUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponseNonSuccessStatusUpdatedCheck

func ResponseNonSuccessStatusUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponseOptionalPropertyUpdatedCheck

func ResponseOptionalPropertyUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponseOptionalPropertyWriteOnlyReadOnlyCheck

func ResponseOptionalPropertyWriteOnlyReadOnlyCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponseParameterEnumValueRemovedCheck

func ResponseParameterEnumValueRemovedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponsePatternAddedOrChangedCheck

func ResponsePatternAddedOrChangedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponsePropertyAllOfUpdatedCheck

func ResponsePropertyAllOfUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponsePropertyAnyOfUpdatedCheck

func ResponsePropertyAnyOfUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponsePropertyBecameNullableCheck

func ResponsePropertyBecameNullableCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponsePropertyBecameOptionalCheck

func ResponsePropertyBecameOptionalCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponsePropertyBecameRequiredCheck

func ResponsePropertyBecameRequiredCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponsePropertyDefaultValueChangedCheck

func ResponsePropertyDefaultValueChangedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponsePropertyEnumValueAddedCheck

func ResponsePropertyEnumValueAddedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponsePropertyMaxIncreasedCheck

func ResponsePropertyMaxIncreasedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponsePropertyMaxLengthIncreasedCheck

func ResponsePropertyMaxLengthIncreasedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponsePropertyMaxLengthUnsetCheck

func ResponsePropertyMaxLengthUnsetCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponsePropertyMinDecreasedCheck

func ResponsePropertyMinDecreasedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponsePropertyMinItemsDecreasedCheck

func ResponsePropertyMinItemsDecreasedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponsePropertyMinItemsUnsetCheck

func ResponsePropertyMinItemsUnsetCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponsePropertyMinLengthDecreasedCheck

func ResponsePropertyMinLengthDecreasedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponsePropertyOneOfUpdated

func ResponsePropertyOneOfUpdated(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponsePropertyTypeChangedCheck

func ResponsePropertyTypeChangedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponseRequiredPropertyUpdatedCheck

func ResponseRequiredPropertyUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponseRequiredPropertyWriteOnlyReadOnlyCheck

func ResponseRequiredPropertyWriteOnlyReadOnlyCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func ResponseSuccessStatusUpdatedCheck

func ResponseSuccessStatusUpdatedCheck(diffReport *diff.Diff, operationsSources *diff.OperationsSourcesMap, config *Config) Changes

func (Changes) GetLevelCount

func (changes Changes) GetLevelCount() map[Level]int

func (Changes) HasLevelOrHigher

func (changes Changes) HasLevelOrHigher(level Level) bool

func (Changes) Len

func (changes Changes) Len() int

func (Changes) Less

func (changes Changes) Less(i, j int) bool

func (Changes) Swap

func (changes Changes) Swap(i, j int)

type ColorMode

type ColorMode int
const (
	ColorAlways ColorMode = iota
	ColorNever
	ColorAuto
	ColorInvalid
)

func NewColorMode

func NewColorMode(color string) (ColorMode, error)

type ComponentChange

type ComponentChange struct {
	Id        string `json:"id,omitempty" yaml:"id,omitempty"`
	Args      []any  `json:"-" yaml:"-"`
	Comment   string `json:"comment,omitempty" yaml:"comment,omitempty"`
	Level     Level  `json:"level" yaml:"level"`
	Component string `json:"component,omitempty" yaml:"component,omitempty"`

	SourceFile      string `json:"-" yaml:"-"`
	SourceLine      int    `json:"-" yaml:"-"`
	SourceLineEnd   int    `json:"-" yaml:"-"`
	SourceColumn    int    `json:"-" yaml:"-"`
	SourceColumnEnd int    `json:"-" yaml:"-"`
}

ComponentChange represnts a change in the Components Section: https://swagger.io/docs/specification/components/

func (ComponentChange) GetArgs

func (c ComponentChange) GetArgs() []any

func (ComponentChange) GetComment

func (c ComponentChange) GetComment(l Localizer) string

func (ComponentChange) GetId

func (c ComponentChange) GetId() string

func (ComponentChange) GetLevel

func (c ComponentChange) GetLevel() Level

func (ComponentChange) GetOperation

func (ComponentChange) GetOperation() string

func (ComponentChange) GetOperationId

func (ComponentChange) GetOperationId() string

func (ComponentChange) GetPath

func (ComponentChange) GetPath() string

func (ComponentChange) GetSection

func (c ComponentChange) GetSection() string

func (ComponentChange) GetSource

func (c ComponentChange) GetSource() string

func (ComponentChange) GetSourceColumn

func (c ComponentChange) GetSourceColumn() int

func (ComponentChange) GetSourceColumnEnd

func (c ComponentChange) GetSourceColumnEnd() int

func (ComponentChange) GetSourceFile

func (c ComponentChange) GetSourceFile() string

func (ComponentChange) GetSourceLine

func (c ComponentChange) GetSourceLine() int

func (ComponentChange) GetSourceLineEnd

func (c ComponentChange) GetSourceLineEnd() int

func (ComponentChange) GetText

func (c ComponentChange) GetText(l Localizer) string

func (ComponentChange) GetUncolorizedText

func (c ComponentChange) GetUncolorizedText(l Localizer) string

func (ComponentChange) IsBreaking

func (c ComponentChange) IsBreaking() bool

func (ComponentChange) MatchIgnore

func (c ComponentChange) MatchIgnore(ignorePath, ignoreLine string, l Localizer) bool

func (ComponentChange) MultiLineError

func (c ComponentChange) MultiLineError(l Localizer, colorMode ColorMode) string

func (ComponentChange) SingleLineError

func (c ComponentChange) SingleLineError(l Localizer, colorMode ColorMode) string

type Config

type Config struct {
	Checks              []BackwardCompatibilityCheck
	MinSunsetBetaDays   int
	MinSunsetStableDays int
	LogLevelOverrides   map[string]Level
}

func GetAllChecks

func GetAllChecks(includeChecks utils.StringList, deprecationDaysBeta int, deprecationDaysStable int) *Config

func GetChecks

func GetChecks(includeChecks utils.StringList) *Config

func GetDefaultChecks

func GetDefaultChecks() *Config

type Level

type Level int
const (
	ERR  Level = 3
	WARN Level = 2
	INFO Level = 1
)

func NewLevel

func NewLevel(level string) (Level, error)

func (Level) IsBreaking

func (level Level) IsBreaking() bool

func (Level) PrettyString

func (level Level) PrettyString() string

func (Level) String

func (level Level) String() string

func (Level) StringCond

func (level Level) StringCond(colorMode ColorMode) string

type Localizer

type Localizer func(key string, args ...interface{}) string

func NewDefaultLocalizer

func NewDefaultLocalizer() Localizer

func NewLocalizer

func NewLocalizer(locale string) Localizer

type SecurityChange

type SecurityChange struct {
	Id      string `json:"id,omitempty" yaml:"id,omitempty"`
	Args    []any  `json:"-" yaml:"-"`
	Comment string `json:"comment,omitempty" yaml:"comment,omitempty"`
	Level   Level  `json:"level" yaml:"level"`

	SourceFile      string `json:"-" yaml:"-"`
	SourceLine      int    `json:"-" yaml:"-"`
	SourceLineEnd   int    `json:"-" yaml:"-"`
	SourceColumn    int    `json:"-" yaml:"-"`
	SourceColumnEnd int    `json:"-" yaml:"-"`
}

SecurityChange represents a change in the Security Section (not to be confised with components/securitySchemes)

func (SecurityChange) GetArgs

func (c SecurityChange) GetArgs() []any

func (SecurityChange) GetComment

func (c SecurityChange) GetComment(l Localizer) string

func (SecurityChange) GetId

func (c SecurityChange) GetId() string

func (SecurityChange) GetLevel

func (c SecurityChange) GetLevel() Level

func (SecurityChange) GetOperation

func (r SecurityChange) GetOperation() string

func (SecurityChange) GetOperationId

func (SecurityChange) GetOperationId() string

func (SecurityChange) GetPath

func (SecurityChange) GetPath() string

func (SecurityChange) GetSection

func (c SecurityChange) GetSection() string

func (SecurityChange) GetSource

func (c SecurityChange) GetSource() string

func (SecurityChange) GetSourceColumn

func (c SecurityChange) GetSourceColumn() int

func (SecurityChange) GetSourceColumnEnd

func (c SecurityChange) GetSourceColumnEnd() int

func (SecurityChange) GetSourceFile

func (c SecurityChange) GetSourceFile() string

func (SecurityChange) GetSourceLine

func (c SecurityChange) GetSourceLine() int

func (SecurityChange) GetSourceLineEnd

func (c SecurityChange) GetSourceLineEnd() int

func (SecurityChange) GetText

func (c SecurityChange) GetText(l Localizer) string

func (SecurityChange) GetUncolorizedText

func (c SecurityChange) GetUncolorizedText(l Localizer) string

func (SecurityChange) IsBreaking

func (c SecurityChange) IsBreaking() bool

func (SecurityChange) MatchIgnore

func (c SecurityChange) MatchIgnore(ignorePath, ignoreLine string, l Localizer) bool

func (SecurityChange) MultiLineError

func (c SecurityChange) MultiLineError(l Localizer, colorMode ColorMode) string

func (SecurityChange) SingleLineError

func (c SecurityChange) SingleLineError(l Localizer, colorMode ColorMode) string

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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