Documentation
¶
Overview ¶
Package model contains all the comparison logic and change types used to determine what changed between two AsyncAPI documents. The package builds on top of libopenapi's what-changed model, reusing its core change types and comparison primitives, while providing AsyncAPI specific comparators and an AsyncAPI shaped breaking-change rules system.
Breaking-rules boundary: every AsyncAPI object (including Contact and License) is classified against THIS package's active breaking-rules configuration. The single deliberate exception is JSON Schema comparison: schema-bearing properties (message payloads/headers, binding query/headers/key fields, components.schemas) delegate to libopenapi's CompareSchemas, which applies libopenapi's own schema rules — including any custom configuration installed with libopenapi's SetActiveBreakingRulesConfig. Each exported AsyncAPI comparator also accepts an optional BreakingRulesConfig. When supplied, that immutable configuration is propagated through the complete nested comparison without changing this package's process-global default.
Index ¶
- Constants
- Variables
- func BreakingAdded(component, property string, configs ...*BreakingRulesConfig) bool
- func BreakingModified(component, property string, configs ...*BreakingRulesConfig) bool
- func BreakingRemoved(component, property string, configs ...*BreakingRulesConfig) bool
- func CheckMapForChangesWithRules[T any, R any](...) map[string]R
- func CheckProperties(properties []*PropertyCheck, configs ...*BreakingRulesConfig)
- func CompareMessageExampleSlices(l, r []low.ValueReference[*lowasync.MessageExample], changes *[]*Change, ...) map[string]*MessageExampleChanges
- func CompareTagSlices(l, r []low.ValueReference[*lowasync.Tag], changes *[]*Change, ...) map[string]*TagChanges
- func ExtractStringValueSliceChangesWithRules(lParam, rParam []low.ValueReference[string], changes *[]*Change, label string, ...)
- func IsBreakingChange(component, property, changeType string, configs ...*BreakingRulesConfig) bool
- func ResetActiveBreakingRulesConfig()
- func ResetDefaultBreakingRules()
- func SetActiveBreakingRulesConfig(config *BreakingRulesConfig)
- type AMQPChannelBindingChanges
- type AMQPChannelBindingRules
- type AMQPExchangeChanges
- type AMQPExchangeRules
- type AMQPMessageBindingChanges
- type AMQPMessageBindingRules
- type AMQPOperationBindingChanges
- type AMQPOperationBindingRules
- type AMQPQueueChanges
- type AMQPQueueRules
- type BreakingChangeRule
- type BreakingRulesConfig
- type Change
- type ChangeContext
- type ChannelBindingsChanges
- type ChannelBindingsRules
- type ChannelChanges
- type ChannelRules
- type ComponentsChanges
- type ComponentsRules
- type ConfigValidationError
- type ConfigValidationResult
- type ContactChanges
- type ContactRules
- type CorrelationIDChanges
- type CorrelationIDRules
- type DocumentChanges
- type ExtensionChanges
- type ExternalDocChanges
- type ExternalDocsRules
- type HTTPChannelBindingChanges
- type HTTPMessageBindingChanges
- type HTTPMessageBindingRules
- type HTTPOperationBindingChanges
- type HTTPOperationBindingRules
- type HTTPServerBindingChanges
- type InfoChanges
- type InfoRules
- type KafkaChannelBindingChanges
- type KafkaChannelBindingRules
- type KafkaMessageBindingChanges
- type KafkaMessageBindingRules
- type KafkaOperationBindingChanges
- type KafkaOperationBindingRules
- type KafkaServerBindingChanges
- type KafkaServerBindingRules
- type KafkaTopicConfigurationChanges
- type KafkaTopicConfigurationRules
- type LicenseChanges
- type LicenseRules
- type MQTTLastWillChanges
- type MQTTLastWillRules
- type MQTTMessageBindingChanges
- type MQTTMessageBindingRules
- type MQTTOperationBindingChanges
- type MQTTOperationBindingRules
- type MQTTServerBindingChanges
- type MQTTServerBindingRules
- type MessageBindingsChanges
- type MessageBindingsRules
- type MessageChanges
- type MessageExampleChanges
- type MessageExampleRules
- type MessageRules
- type MessageTraitChanges
- type MessageTraitRules
- type OAuthFlowChanges
- type OAuthFlowRules
- type OAuthFlowsChanges
- type OAuthFlowsRules
- type OperationBindingsChanges
- type OperationBindingsRules
- type OperationChanges
- type OperationReplyAddressChanges
- type OperationReplyAddressRules
- type OperationReplyChanges
- type OperationReplyRules
- type OperationRules
- type OperationTraitChanges
- type OperationTraitRules
- type ParameterChanges
- type ParameterRules
- type PropertyChanges
- type PropertyCheck
- type SQSChannelBindingChanges
- type SQSChannelBindingRules
- type SQSIdentifierChanges
- type SQSIdentifierRules
- type SQSMessageBindingChanges
- type SQSOperationBindingChanges
- type SQSOperationBindingRules
- type SQSPolicyChanges
- type SQSPolicyRules
- type SQSPolicyStatementChanges
- type SQSPolicyStatementRules
- type SQSQueueChanges
- type SQSQueueRules
- type SQSRedrivePolicyChanges
- type SQSRedrivePolicyRules
- type SQSServerBindingChanges
- type SecuritySchemeChanges
- type SecuritySchemeRules
- type ServerBindingsChanges
- type ServerBindingsRules
- type ServerChanges
- type ServerRules
- type ServerVariableChanges
- type ServerVariableRules
- type TagChanges
- type TagRules
- type WebSocketChannelBindingChanges
- type WebSocketChannelBindingRules
Constants ¶
const ( CompAsyncAPI = "asyncapi" CompID = "id" CompDefaultContentType = "defaultContentType" CompInfo = "info" CompServers = "servers" CompChannels = "channels" CompOperations = "operations" CompComponents = "components" CompServer = "server" CompServerVariable = "serverVariable" CompChannel = "channel" CompParameter = "parameter" CompOperation = "operation" CompOperationTrait = "operationTrait" CompOperationReply = "operationReply" CompOperationReplyAddress = "operationReplyAddress" CompMessage = "message" CompMessageTrait = "messageTrait" CompMessageExample = "messageExample" CompCorrelationID = "correlationId" CompContact = "contact" CompLicense = "license" CompSecurityScheme = "securityScheme" CompOAuthFlows = "oauthFlows" CompOAuthFlow = "oauthFlow" CompTag = "tag" CompExternalDocs = "externalDocs" CompServerBindings = "serverBindings" CompChannelBindings = "channelBindings" CompOperationBindings = "operationBindings" CompMessageBindings = "messageBindings" CompHTTPOperationBinding = "httpOperationBinding" CompHTTPMessageBinding = "httpMessageBinding" CompKafkaServerBinding = "kafkaServerBinding" CompKafkaChannelBinding = "kafkaChannelBinding" CompKafkaTopicConfiguration = "kafkaTopicConfiguration" CompKafkaOperationBinding = "kafkaOperationBinding" CompKafkaMessageBinding = "kafkaMessageBinding" CompWebSocketChannelBinding = "wsChannelBinding" CompAMQPChannelBinding = "amqpChannelBinding" CompAMQPExchange = "amqpExchange" CompAMQPQueue = "amqpQueue" CompAMQPOperationBinding = "amqpOperationBinding" CompAMQPMessageBinding = "amqpMessageBinding" CompMQTTServerBinding = "mqttServerBinding" CompMQTTLastWill = "mqttLastWill" CompMQTTOperationBinding = "mqttOperationBinding" CompMQTTMessageBinding = "mqttMessageBinding" CompSQSChannelBinding = "sqsChannelBinding" CompSQSOperationBinding = "sqsOperationBinding" CompSQSQueue = "sqsQueue" CompSQSIdentifier = "sqsIdentifier" CompSQSRedrivePolicy = "sqsRedrivePolicy" CompSQSPolicy = "sqsPolicy" CompSQSPolicyStatement = "sqsPolicyStatement" )
Component name constants for breaking change rule lookups. These match the JSON keys used in BreakingRulesConfig.
const ( PropAck = "ack" PropAction = "action" PropAddress = "address" PropAMQP = "amqp" PropARN = "arn" PropAuthorizationCode = "authorizationCode" PropAuthorizationURL = "authorizationUrl" PropAutoDelete = "autoDelete" PropAvailableScopes = "availableScopes" PropBCC = "bcc" PropBearerFormat = "bearerFormat" PropBindings = "bindings" PropBindingVersion = "bindingVersion" PropCC = "cc" PropChannel = "channel" PropChannelBindings = "channelBindings" PropChannels = "channels" PropCleanSession = "cleanSession" PropCleanupPolicy = "cleanup.policy" PropClientCredentials = "clientCredentials" PropClientID = "clientId" PropCondition = "condition" PropConfluentKeySchemaValidation = "confluent.key.schema.validation" PropConfluentKeySubjectNameStrategy = "confluent.key.subject.name.strategy" PropConfluentValueSchemaValidation = "confluent.value.schema.validation" PropConfluentValueSubjectNameStrategy = "confluent.value.subject.name.strategy" PropContact = "contact" PropContentEncoding = "contentEncoding" PropContentType = "contentType" PropCorrelationData = "correlationData" PropCorrelationID = "correlationId" PropCorrelationIDs = "correlationIds" PropDeadLetterQueue = "deadLetterQueue" PropDeduplicationScope = "deduplicationScope" PropDefault = "default" PropDeleteRetentionMs = "delete.retention.ms" PropDeliveryDelay = "deliveryDelay" PropDeliveryMode = "deliveryMode" PropDescription = "description" PropDurable = "durable" PropEffect = "effect" PropEmail = "email" PropEnum = "enum" PropExamples = "examples" PropExchange = "exchange" PropExclusive = "exclusive" PropExpiration = "expiration" PropExternalDocs = "externalDocs" PropFifoQueue = "fifoQueue" PropFifoThroughputLimit = "fifoThroughputLimit" PropFlows = "flows" PropGroupID = "groupId" PropHeaders = "headers" PropHost = "host" PropHTTP = "http" PropIdentifier = "identifier" PropImplicit = "implicit" PropIn = "in" PropIs = "is" PropKafka = "kafka" PropKeepAlive = "keepAlive" PropKey = "key" PropLastWill = "lastWill" PropLicense = "license" PropLocation = "location" PropMandatory = "mandatory" PropMaximumPacketSize = "maximumPacketSize" PropMaxMessageBytes = "max.message.bytes" PropMaxReceiveCount = "maxReceiveCount" PropMessage = "message" PropMessageBindings = "messageBindings" PropMessageRetentionPeriod = "messageRetentionPeriod" PropMessages = "messages" PropMessageTraits = "messageTraits" PropMessageType = "messageType" PropMethod = "method" PropMQTT = "mqtt" PropName = "name" PropOpenIDConnectURL = "openIdConnectUrl" PropOperations = "operations" PropOperationBindings = "operationBindings" PropOperationTraits = "operationTraits" PropParameters = "parameters" PropPartitions = "partitions" PropPassword = "password" PropPathname = "pathname" PropPayload = "payload" PropPayloadFormatIndicator = "payloadFormatIndicator" PropPolicy = "policy" PropPrincipal = "principal" PropPriority = "priority" PropProtocol = "protocol" PropProtocolVersion = "protocolVersion" PropQoS = "qos" PropQuery = "query" PropQueue = "queue" PropQueues = "queues" PropReceiveMessageWaitTime = "receiveMessageWaitTime" PropRedrivePolicy = "redrivePolicy" PropRefreshURL = "refreshUrl" PropReplicas = "replicas" PropReplies = "replies" PropReply = "reply" PropReplyAddresses = "replyAddresses" PropResource = "resource" PropResponseTopic = "responseTopic" PropRetain = "retain" PropRetentionBytes = "retention.bytes" PropRetentionMs = "retention.ms" PropSchemaIDLocation = "schemaIdLocation" PropSchemaIDPayloadEncoding = "schemaIdPayloadEncoding" PropSchemaLookupStrategy = "schemaLookupStrategy" PropSchemaRegistryURL = "schemaRegistryUrl" PropSchemaRegistryVendor = "schemaRegistryVendor" PropSchemas = "schemas" PropScheme = "scheme" PropScopes = "scopes" PropSecurity = "security" PropSecuritySchemes = "securitySchemes" PropServerBindings = "serverBindings" PropServers = "servers" PropServerVariables = "serverVariables" PropSessionExpiryInterval = "sessionExpiryInterval" PropSQS = "sqs" PropStatements = "statements" PropStatusCode = "statusCode" PropSummary = "summary" PropTags = "tags" PropTermsOfService = "termsOfService" PropTimestamp = "timestamp" PropTitle = "title" PropTokenURL = "tokenUrl" PropTopic = "topic" PropTopicConfiguration = "topicConfiguration" PropTraits = "traits" PropType = "type" PropURL = "url" PropUserID = "userId" PropVariables = "variables" PropVersion = "version" PropVHost = "vhost" PropVisibilityTimeout = "visibilityTimeout" PropWS = "ws" )
Property name constants for breaking change rule lookups. These match the JSON keys used in the various *Rules structs.
const ( // Modified means the value was changed. Modified = wcmodel.Modified // PropertyAdded means a new property to an object was added. PropertyAdded = wcmodel.PropertyAdded // ObjectAdded means a new object was added. ObjectAdded = wcmodel.ObjectAdded // ObjectRemoved means an object was removed. ObjectRemoved = wcmodel.ObjectRemoved // PropertyRemoved means a property of an object was removed. PropertyRemoved = wcmodel.PropertyRemoved )
Change type constants, aliased from libopenapi's what-changed model.
const ( ChangeTypeAdded = wcmodel.ChangeTypeAdded ChangeTypeModified = wcmodel.ChangeTypeModified ChangeTypeRemoved = wcmodel.ChangeTypeRemoved )
ChangeType constants for breaking rules lookups.
Variables ¶
var ( // NewPropertyChanges creates a new PropertyChanges instance from a set of changes. NewPropertyChanges = wcmodel.NewPropertyChanges // CreateChange creates a new Change of type T with the provided types CreateChange = wcmodel.CreateChange // CreateChangeWithEncoding creates a new Change with YAML-encoded original/new values, // used for complex types like extensions. CreateChangeWithEncoding = wcmodel.CreateChangeWithEncoding // CompareExtensions compares a left and right map of extension nodes for any changes. CompareExtensions = wcmodel.CompareExtensions // CountBreakingChanges counts the number of changes in a slice that are breaking. CountBreakingChanges = wcmodel.CountBreakingChanges )
Non-generic comparison primitives re-exported from libopenapi's what-changed model. These are config free (they take an explicit breaking flag or none at all), so they behave identically regardless of which breaking-rules configuration is active.
Functions ¶
func BreakingAdded ¶
func BreakingAdded(component, property string, configs ...*BreakingRulesConfig) bool
BreakingAdded returns whether adding the specified property is a breaking change.
func BreakingModified ¶
func BreakingModified(component, property string, configs ...*BreakingRulesConfig) bool
BreakingModified returns whether modifying the specified property is a breaking change.
func BreakingRemoved ¶
func BreakingRemoved(component, property string, configs ...*BreakingRulesConfig) bool
BreakingRemoved returns whether removing the specified property is a breaking change.
func CheckMapForChangesWithRules ¶
func CheckMapForChangesWithRules[T any, R any](expLeft, expRight *orderedmap.Map[low.KeyReference[string], low.ValueReference[T]], changes *[]*Change, label string, compareFunc func(l, r T) R, component, property string, configs ...*BreakingRulesConfig, ) map[string]R
CheckMapForChangesWithRules checks a left and right low level map for any additions, subtractions or modifications to values, resolving breaking status for additions and removals from this package's active AsyncAPI breaking-rules configuration.
func CheckProperties ¶
func CheckProperties(properties []*PropertyCheck, configs ...*BreakingRulesConfig)
CheckProperties checks a slice of PropertyCheck objects for additions, removals and modifications, resolving per change-type breaking status from this package's active AsyncAPI breaking-rules configuration.
func CompareMessageExampleSlices ¶
func CompareMessageExampleSlices(l, r []low.ValueReference[*lowasync.MessageExample], changes *[]*Change, component, property string, configs ...*BreakingRulesConfig, ) map[string]*MessageExampleChanges
CompareMessageExampleSlices compares two slices of message example value references, keyed by example name. Named examples present on both sides are compared field by field with CompareMessageExamples; unnamed examples fall back to hash identity, so an edited unnamed example reports as one removal plus one addition. Returns a map of example name (or hash for unnamed entries) to MessageExampleChanges, or nil if no keyed examples changed.
func CompareTagSlices ¶
func CompareTagSlices(l, r []low.ValueReference[*lowasync.Tag], changes *[]*Change, component, property string, configs ...*BreakingRulesConfig, ) map[string]*TagChanges
CompareTagSlices compares two slices of Tag value references by name and occurrence. Added and removed tags are recorded against the supplied component and property rules, and modified tags are compared with CompareTags. Repeated and unnamed tags retain every occurrence instead of collapsing in a map. Modified duplicates use a stable "name#N" result key; unique names keep their original key.
func ExtractStringValueSliceChangesWithRules ¶
func ExtractStringValueSliceChangesWithRules(lParam, rParam []low.ValueReference[string], changes *[]*Change, label string, component, property string, configs ...*BreakingRulesConfig, )
ExtractStringValueSliceChangesWithRules compares two low level string slices for changes, resolving breaking status from this package's active AsyncAPI breaking-rules configuration. Slices are compared as value sets, so duplicate entries collapse to one and reordering reports nothing.
func IsBreakingChange ¶
func IsBreakingChange(component, property, changeType string, configs ...*BreakingRulesConfig) bool
IsBreakingChange is a package-level helper that looks up whether a change is breaking using the currently active configuration.
func ResetActiveBreakingRulesConfig ¶
func ResetActiveBreakingRulesConfig()
ResetActiveBreakingRulesConfig clears any custom config and reverts to defaults.
func ResetDefaultBreakingRules ¶
func ResetDefaultBreakingRules()
ResetDefaultBreakingRules resets the cached default rules. This is primarily intended for testing scenarios where the cache needs to be cleared.
func SetActiveBreakingRulesConfig ¶
func SetActiveBreakingRulesConfig(config *BreakingRulesConfig)
SetActiveBreakingRulesConfig sets the active breaking rules configuration used by comparison functions. Pass nil to reset to defaults.
The active configuration is process-global and is captured when a comparison starts. Prefer passing a config directly to a comparator when callers need independent rules.
Types ¶
type AMQPChannelBindingChanges ¶
type AMQPChannelBindingChanges struct {
*PropertyChanges
ExchangeChanges *AMQPExchangeChanges `json:"exchange,omitempty" yaml:"exchange,omitempty"`
QueueChanges *AMQPQueueChanges `json:"queue,omitempty" yaml:"queue,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
AMQPChannelBindingChanges represents changes made to an AsyncAPI AMQP Channel Binding object.
func CompareAMQPChannelBinding ¶
func CompareAMQPChannelBinding(l, r *lowasync.AMQPChannelBinding, configs ...*BreakingRulesConfig) *AMQPChannelBindingChanges
CompareAMQPChannelBinding compares two AsyncAPI AMQP Channel Binding objects and returns a pointer to AMQPChannelBindingChanges, or nil if nothing changed.
func (*AMQPChannelBindingChanges) GetAllChanges ¶
func (a *AMQPChannelBindingChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between AMQP Channel Binding objects.
func (*AMQPChannelBindingChanges) TotalBreakingChanges ¶
func (a *AMQPChannelBindingChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*AMQPChannelBindingChanges) TotalChanges ¶
func (a *AMQPChannelBindingChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type AMQPChannelBindingRules ¶
type AMQPChannelBindingRules struct {
Is *BreakingChangeRule `json:"is,omitempty" yaml:"is,omitempty"`
Exchange *BreakingChangeRule `json:"exchange,omitempty" yaml:"exchange,omitempty"`
Queue *BreakingChangeRule `json:"queue,omitempty" yaml:"queue,omitempty"`
BindingVersion *BreakingChangeRule `json:"bindingVersion,omitempty" yaml:"bindingVersion,omitempty"`
}
AMQPChannelBindingRules defines breaking rules for the AMQP Channel Binding properties.
type AMQPExchangeChanges ¶
type AMQPExchangeChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
AMQPExchangeChanges represents changes made to an AsyncAPI AMQP Exchange object.
func CompareAMQPExchange ¶
func CompareAMQPExchange(l, r *lowasync.AMQPExchange, configs ...*BreakingRulesConfig) *AMQPExchangeChanges
CompareAMQPExchange compares two AsyncAPI AMQP Exchange objects and returns a pointer to AMQPExchangeChanges, or nil if nothing changed.
func (*AMQPExchangeChanges) GetAllChanges ¶
func (a *AMQPExchangeChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between AMQP Exchange objects.
func (*AMQPExchangeChanges) TotalBreakingChanges ¶
func (a *AMQPExchangeChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*AMQPExchangeChanges) TotalChanges ¶
func (a *AMQPExchangeChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type AMQPExchangeRules ¶
type AMQPExchangeRules struct {
Name *BreakingChangeRule `json:"name,omitempty" yaml:"name,omitempty"`
Type *BreakingChangeRule `json:"type,omitempty" yaml:"type,omitempty"`
Durable *BreakingChangeRule `json:"durable,omitempty" yaml:"durable,omitempty"`
AutoDelete *BreakingChangeRule `json:"autoDelete,omitempty" yaml:"autoDelete,omitempty"`
VHost *BreakingChangeRule `json:"vhost,omitempty" yaml:"vhost,omitempty"`
}
AMQPExchangeRules defines breaking rules for the AMQP Exchange properties.
type AMQPMessageBindingChanges ¶
type AMQPMessageBindingChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
AMQPMessageBindingChanges represents changes made to an AsyncAPI AMQP Message Binding object.
func CompareAMQPMessageBinding ¶
func CompareAMQPMessageBinding(l, r *lowasync.AMQPMessageBinding, configs ...*BreakingRulesConfig) *AMQPMessageBindingChanges
CompareAMQPMessageBinding compares two AsyncAPI AMQP Message Binding objects and returns a pointer to AMQPMessageBindingChanges, or nil if nothing changed.
func (*AMQPMessageBindingChanges) GetAllChanges ¶
func (a *AMQPMessageBindingChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between AMQP Message Binding objects.
func (*AMQPMessageBindingChanges) TotalBreakingChanges ¶
func (a *AMQPMessageBindingChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*AMQPMessageBindingChanges) TotalChanges ¶
func (a *AMQPMessageBindingChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type AMQPMessageBindingRules ¶
type AMQPMessageBindingRules struct {
ContentEncoding *BreakingChangeRule `json:"contentEncoding,omitempty" yaml:"contentEncoding,omitempty"`
MessageType *BreakingChangeRule `json:"messageType,omitempty" yaml:"messageType,omitempty"`
BindingVersion *BreakingChangeRule `json:"bindingVersion,omitempty" yaml:"bindingVersion,omitempty"`
}
AMQPMessageBindingRules defines breaking rules for the AMQP Message Binding properties.
type AMQPOperationBindingChanges ¶
type AMQPOperationBindingChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
AMQPOperationBindingChanges represents changes made to an AsyncAPI AMQP Operation Binding object.
func CompareAMQPOperationBinding ¶
func CompareAMQPOperationBinding(l, r *lowasync.AMQPOperationBinding, configs ...*BreakingRulesConfig) *AMQPOperationBindingChanges
CompareAMQPOperationBinding compares two AsyncAPI AMQP Operation Binding objects and returns a pointer to AMQPOperationBindingChanges, or nil if nothing changed.
func (*AMQPOperationBindingChanges) GetAllChanges ¶
func (a *AMQPOperationBindingChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between AMQP Operation Binding objects.
func (*AMQPOperationBindingChanges) TotalBreakingChanges ¶
func (a *AMQPOperationBindingChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*AMQPOperationBindingChanges) TotalChanges ¶
func (a *AMQPOperationBindingChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type AMQPOperationBindingRules ¶
type AMQPOperationBindingRules struct {
Expiration *BreakingChangeRule `json:"expiration,omitempty" yaml:"expiration,omitempty"`
UserID *BreakingChangeRule `json:"userId,omitempty" yaml:"userId,omitempty"`
CC *BreakingChangeRule `json:"cc,omitempty" yaml:"cc,omitempty"`
Priority *BreakingChangeRule `json:"priority,omitempty" yaml:"priority,omitempty"`
DeliveryMode *BreakingChangeRule `json:"deliveryMode,omitempty" yaml:"deliveryMode,omitempty"`
Mandatory *BreakingChangeRule `json:"mandatory,omitempty" yaml:"mandatory,omitempty"`
BCC *BreakingChangeRule `json:"bcc,omitempty" yaml:"bcc,omitempty"`
Timestamp *BreakingChangeRule `json:"timestamp,omitempty" yaml:"timestamp,omitempty"`
Ack *BreakingChangeRule `json:"ack,omitempty" yaml:"ack,omitempty"`
BindingVersion *BreakingChangeRule `json:"bindingVersion,omitempty" yaml:"bindingVersion,omitempty"`
}
AMQPOperationBindingRules defines breaking rules for the AMQP Operation Binding properties.
type AMQPQueueChanges ¶
type AMQPQueueChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
AMQPQueueChanges represents changes made to an AsyncAPI AMQP Queue object.
func CompareAMQPQueue ¶
func CompareAMQPQueue(l, r *lowasync.AMQPQueue, configs ...*BreakingRulesConfig) *AMQPQueueChanges
CompareAMQPQueue compares two AsyncAPI AMQP Queue objects and returns a pointer to AMQPQueueChanges, or nil if nothing changed.
func (*AMQPQueueChanges) GetAllChanges ¶
func (a *AMQPQueueChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between AMQP Queue objects.
func (*AMQPQueueChanges) TotalBreakingChanges ¶
func (a *AMQPQueueChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*AMQPQueueChanges) TotalChanges ¶
func (a *AMQPQueueChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type AMQPQueueRules ¶
type AMQPQueueRules struct {
Name *BreakingChangeRule `json:"name,omitempty" yaml:"name,omitempty"`
Durable *BreakingChangeRule `json:"durable,omitempty" yaml:"durable,omitempty"`
Exclusive *BreakingChangeRule `json:"exclusive,omitempty" yaml:"exclusive,omitempty"`
AutoDelete *BreakingChangeRule `json:"autoDelete,omitempty" yaml:"autoDelete,omitempty"`
VHost *BreakingChangeRule `json:"vhost,omitempty" yaml:"vhost,omitempty"`
}
AMQPQueueRules defines breaking rules for the AMQP Queue properties.
type BreakingChangeRule ¶
type BreakingChangeRule = wcmodel.BreakingChangeRule
BreakingChangeRule holds the breaking status for a property's change types. nil values mean "use default" - only set values override the defaults.
type BreakingRulesConfig ¶
type BreakingRulesConfig struct {
AsyncAPI *BreakingChangeRule `json:"asyncapi,omitempty" yaml:"asyncapi,omitempty"`
ID *BreakingChangeRule `json:"id,omitempty" yaml:"id,omitempty"`
DefaultContentType *BreakingChangeRule `json:"defaultContentType,omitempty" yaml:"defaultContentType,omitempty"`
Servers *BreakingChangeRule `json:"servers,omitempty" yaml:"servers,omitempty"`
Channels *BreakingChangeRule `json:"channels,omitempty" yaml:"channels,omitempty"`
Operations *BreakingChangeRule `json:"operations,omitempty" yaml:"operations,omitempty"`
Info *InfoRules `json:"info,omitempty" yaml:"info,omitempty"`
Contact *ContactRules `json:"contact,omitempty" yaml:"contact,omitempty"`
License *LicenseRules `json:"license,omitempty" yaml:"license,omitempty"`
Server *ServerRules `json:"server,omitempty" yaml:"server,omitempty"`
ServerVariable *ServerVariableRules `json:"serverVariable,omitempty" yaml:"serverVariable,omitempty"`
Channel *ChannelRules `json:"channel,omitempty" yaml:"channel,omitempty"`
Parameter *ParameterRules `json:"parameter,omitempty" yaml:"parameter,omitempty"`
Operation *OperationRules `json:"operation,omitempty" yaml:"operation,omitempty"`
OperationTrait *OperationTraitRules `json:"operationTrait,omitempty" yaml:"operationTrait,omitempty"`
OperationReply *OperationReplyRules `json:"operationReply,omitempty" yaml:"operationReply,omitempty"`
OperationReplyAddr *OperationReplyAddressRules `json:"operationReplyAddress,omitempty" yaml:"operationReplyAddress,omitempty"`
Message *MessageRules `json:"message,omitempty" yaml:"message,omitempty"`
MessageTrait *MessageTraitRules `json:"messageTrait,omitempty" yaml:"messageTrait,omitempty"`
MessageExample *MessageExampleRules `json:"messageExample,omitempty" yaml:"messageExample,omitempty"`
CorrelationID *CorrelationIDRules `json:"correlationId,omitempty" yaml:"correlationId,omitempty"`
Components *ComponentsRules `json:"components,omitempty" yaml:"components,omitempty"`
SecurityScheme *SecuritySchemeRules `json:"securityScheme,omitempty" yaml:"securityScheme,omitempty"`
OAuthFlows *OAuthFlowsRules `json:"oauthFlows,omitempty" yaml:"oauthFlows,omitempty"`
OAuthFlow *OAuthFlowRules `json:"oauthFlow,omitempty" yaml:"oauthFlow,omitempty"`
Tag *TagRules `json:"tag,omitempty" yaml:"tag,omitempty"`
ExternalDocs *ExternalDocsRules `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
ServerBindings *ServerBindingsRules `json:"serverBindings,omitempty" yaml:"serverBindings,omitempty"`
ChannelBindings *ChannelBindingsRules `json:"channelBindings,omitempty" yaml:"channelBindings,omitempty"`
OperationBindings *OperationBindingsRules `json:"operationBindings,omitempty" yaml:"operationBindings,omitempty"`
MessageBindings *MessageBindingsRules `json:"messageBindings,omitempty" yaml:"messageBindings,omitempty"`
HTTPOperation *HTTPOperationBindingRules `json:"httpOperationBinding,omitempty" yaml:"httpOperationBinding,omitempty"`
HTTPMessage *HTTPMessageBindingRules `json:"httpMessageBinding,omitempty" yaml:"httpMessageBinding,omitempty"`
KafkaServer *KafkaServerBindingRules `json:"kafkaServerBinding,omitempty" yaml:"kafkaServerBinding,omitempty"`
KafkaChannel *KafkaChannelBindingRules `json:"kafkaChannelBinding,omitempty" yaml:"kafkaChannelBinding,omitempty"`
KafkaTopicConfig *KafkaTopicConfigurationRules `json:"kafkaTopicConfiguration,omitempty" yaml:"kafkaTopicConfiguration,omitempty"`
KafkaOperation *KafkaOperationBindingRules `json:"kafkaOperationBinding,omitempty" yaml:"kafkaOperationBinding,omitempty"`
KafkaMessage *KafkaMessageBindingRules `json:"kafkaMessageBinding,omitempty" yaml:"kafkaMessageBinding,omitempty"`
WebSocketChannel *WebSocketChannelBindingRules `json:"wsChannelBinding,omitempty" yaml:"wsChannelBinding,omitempty"`
AMQPChannel *AMQPChannelBindingRules `json:"amqpChannelBinding,omitempty" yaml:"amqpChannelBinding,omitempty"`
AMQPExchange *AMQPExchangeRules `json:"amqpExchange,omitempty" yaml:"amqpExchange,omitempty"`
AMQPQueue *AMQPQueueRules `json:"amqpQueue,omitempty" yaml:"amqpQueue,omitempty"`
AMQPOperation *AMQPOperationBindingRules `json:"amqpOperationBinding,omitempty" yaml:"amqpOperationBinding,omitempty"`
AMQPMessage *AMQPMessageBindingRules `json:"amqpMessageBinding,omitempty" yaml:"amqpMessageBinding,omitempty"`
MQTTServer *MQTTServerBindingRules `json:"mqttServerBinding,omitempty" yaml:"mqttServerBinding,omitempty"`
MQTTLastWill *MQTTLastWillRules `json:"mqttLastWill,omitempty" yaml:"mqttLastWill,omitempty"`
MQTTOperation *MQTTOperationBindingRules `json:"mqttOperationBinding,omitempty" yaml:"mqttOperationBinding,omitempty"`
MQTTMessage *MQTTMessageBindingRules `json:"mqttMessageBinding,omitempty" yaml:"mqttMessageBinding,omitempty"`
SQSChannel *SQSChannelBindingRules `json:"sqsChannelBinding,omitempty" yaml:"sqsChannelBinding,omitempty"`
SQSOperation *SQSOperationBindingRules `json:"sqsOperationBinding,omitempty" yaml:"sqsOperationBinding,omitempty"`
SQSQueue *SQSQueueRules `json:"sqsQueue,omitempty" yaml:"sqsQueue,omitempty"`
SQSIdentifier *SQSIdentifierRules `json:"sqsIdentifier,omitempty" yaml:"sqsIdentifier,omitempty"`
SQSRedrivePolicy *SQSRedrivePolicyRules `json:"sqsRedrivePolicy,omitempty" yaml:"sqsRedrivePolicy,omitempty"`
SQSPolicy *SQSPolicyRules `json:"sqsPolicy,omitempty" yaml:"sqsPolicy,omitempty"`
SQSPolicyStatement *SQSPolicyStatementRules `json:"sqsPolicyStatement,omitempty" yaml:"sqsPolicyStatement,omitempty"`
// contains filtered or unexported fields
}
BreakingRulesConfig holds all breaking change rules organized by AsyncAPI component. Structure mirrors the AsyncAPI 3.0 specification.
func GenerateDefaultBreakingRules ¶
func GenerateDefaultBreakingRules() *BreakingRulesConfig
GenerateDefaultBreakingRules returns the default breaking change rules for AsyncAPI 3.0. The returned config is cached and reused for performance — do not mutate it. To customize rules, use NewDefaultBreakingRulesConfig and Merge.
func GetActiveBreakingRulesConfig ¶
func GetActiveBreakingRulesConfig() *BreakingRulesConfig
GetActiveBreakingRulesConfig returns the currently active breaking rules config. If no custom config has been set, returns the default rules.
func NewDefaultBreakingRulesConfig ¶
func NewDefaultBreakingRulesConfig() *BreakingRulesConfig
NewDefaultBreakingRulesConfig returns a fresh copy of the default breaking change rules that is safe to mutate or Merge custom overrides into. Pass it directly to a comparator, or activate it process-wide with SetActiveBreakingRulesConfig.
func (*BreakingRulesConfig) GetRule ¶
func (c *BreakingRulesConfig) GetRule(component, property string) *BreakingChangeRule
GetRule returns the BreakingChangeRule for a given component and property. Returns nil if no rule is defined. Uses internal cache for O(1) lookups.
func (*BreakingRulesConfig) IsBreaking ¶
func (c *BreakingRulesConfig) IsBreaking(component, property, changeType string) bool
IsBreaking looks up whether a change is breaking based on the component, property, and change type. Returns the configured breaking status, or false if the rule is not found.
func (*BreakingRulesConfig) Merge ¶
func (c *BreakingRulesConfig) Merge(override *BreakingRulesConfig)
Merge applies user overrides to the configuration. Only non-nil values from the override config replace the current values. Uses reflection to reduce boilerplate.
type ChangeContext ¶
type ChangeContext = wcmodel.ChangeContext
ChangeContext holds a reference to the line and column positions of original and new change.
type ChannelBindingsChanges ¶
type ChannelBindingsChanges struct {
*PropertyChanges
HTTPChanges *HTTPChannelBindingChanges `json:"http,omitempty" yaml:"http,omitempty"`
WebSocketChanges *WebSocketChannelBindingChanges `json:"ws,omitempty" yaml:"ws,omitempty"`
KafkaChanges *KafkaChannelBindingChanges `json:"kafka,omitempty" yaml:"kafka,omitempty"`
AMQPChanges *AMQPChannelBindingChanges `json:"amqp,omitempty" yaml:"amqp,omitempty"`
SQSChanges *SQSChannelBindingChanges `json:"sqs,omitempty" yaml:"sqs,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
ChannelBindingsChanges represents changes made to an AsyncAPI ChannelBindings object.
func CompareChannelBindings ¶
func CompareChannelBindings(l, r *lowasync.ChannelBindings, configs ...*BreakingRulesConfig) *ChannelBindingsChanges
CompareChannelBindings compares two AsyncAPI ChannelBindings objects and returns a pointer to ChannelBindingsChanges, or nil if nothing changed.
func (*ChannelBindingsChanges) GetAllChanges ¶
func (c *ChannelBindingsChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between ChannelBindings objects.
func (*ChannelBindingsChanges) TotalBreakingChanges ¶
func (c *ChannelBindingsChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*ChannelBindingsChanges) TotalChanges ¶
func (c *ChannelBindingsChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type ChannelBindingsRules ¶
type ChannelBindingsRules struct {
HTTP *BreakingChangeRule `json:"http,omitempty" yaml:"http,omitempty"`
WebSocket *BreakingChangeRule `json:"ws,omitempty" yaml:"ws,omitempty"`
Kafka *BreakingChangeRule `json:"kafka,omitempty" yaml:"kafka,omitempty"`
AMQP *BreakingChangeRule `json:"amqp,omitempty" yaml:"amqp,omitempty"`
SQS *BreakingChangeRule `json:"sqs,omitempty" yaml:"sqs,omitempty"`
}
ChannelBindingsRules defines breaking rules for the Channel Bindings container properties.
type ChannelChanges ¶
type ChannelChanges struct {
*PropertyChanges
MessageChanges map[string]*MessageChanges `json:"messages,omitempty" yaml:"messages,omitempty"`
ParameterChanges map[string]*ParameterChanges `json:"parameters,omitempty" yaml:"parameters,omitempty"`
TagChanges map[string]*TagChanges `json:"tags,omitempty" yaml:"tags,omitempty"`
ExternalDocChanges *ExternalDocChanges `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
BindingsChanges *ChannelBindingsChanges `json:"bindings,omitempty" yaml:"bindings,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
ChannelChanges represents changes made to a single AsyncAPI Channel object.
func CompareChannels ¶
func CompareChannels(l, r *lowasync.Channel, configs ...*BreakingRulesConfig) *ChannelChanges
CompareChannels compares two AsyncAPI Channel objects and returns a pointer to ChannelChanges, or nil if nothing changed.
The channel address is nullable in AsyncAPI 3.0, so addition, removal and modification of the address are checked by hand. Server entries are reference-only and compared as sets of reference strings, never recursed into.
func (*ChannelChanges) GetAllChanges ¶
func (c *ChannelChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between Channel objects.
func (*ChannelChanges) TotalBreakingChanges ¶
func (c *ChannelChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*ChannelChanges) TotalChanges ¶
func (c *ChannelChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type ChannelRules ¶
type ChannelRules struct {
Address *BreakingChangeRule `json:"address,omitempty" yaml:"address,omitempty"`
Title *BreakingChangeRule `json:"title,omitempty" yaml:"title,omitempty"`
Summary *BreakingChangeRule `json:"summary,omitempty" yaml:"summary,omitempty"`
Description *BreakingChangeRule `json:"description,omitempty" yaml:"description,omitempty"`
Messages *BreakingChangeRule `json:"messages,omitempty" yaml:"messages,omitempty"`
Parameters *BreakingChangeRule `json:"parameters,omitempty" yaml:"parameters,omitempty"`
Servers *BreakingChangeRule `json:"servers,omitempty" yaml:"servers,omitempty"`
Tags *BreakingChangeRule `json:"tags,omitempty" yaml:"tags,omitempty"`
ExternalDocs *BreakingChangeRule `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
Bindings *BreakingChangeRule `json:"bindings,omitempty" yaml:"bindings,omitempty"`
}
ChannelRules defines breaking rules for the Channel object properties.
type ComponentsChanges ¶
type ComponentsChanges struct {
*PropertyChanges
SchemaChanges map[string]*wcmodel.SchemaChanges `json:"schemas,omitempty" yaml:"schemas,omitempty"`
ServerChanges map[string]*ServerChanges `json:"servers,omitempty" yaml:"servers,omitempty"`
ChannelChanges map[string]*ChannelChanges `json:"channels,omitempty" yaml:"channels,omitempty"`
OperationChanges map[string]*OperationChanges `json:"operations,omitempty" yaml:"operations,omitempty"`
MessageChanges map[string]*MessageChanges `json:"messages,omitempty" yaml:"messages,omitempty"`
SecuritySchemeChanges map[string]*SecuritySchemeChanges `json:"securitySchemes,omitempty" yaml:"securitySchemes,omitempty"`
ServerVariableChanges map[string]*ServerVariableChanges `json:"serverVariables,omitempty" yaml:"serverVariables,omitempty"`
ParameterChanges map[string]*ParameterChanges `json:"parameters,omitempty" yaml:"parameters,omitempty"`
CorrelationIDChanges map[string]*CorrelationIDChanges `json:"correlationIds,omitempty" yaml:"correlationIds,omitempty"`
ReplyChanges map[string]*OperationReplyChanges `json:"replies,omitempty" yaml:"replies,omitempty"`
ReplyAddressChanges map[string]*OperationReplyAddressChanges `json:"replyAddresses,omitempty" yaml:"replyAddresses,omitempty"`
ExternalDocChanges map[string]*ExternalDocChanges `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
TagChanges map[string]*TagChanges `json:"tags,omitempty" yaml:"tags,omitempty"`
OperationTraitChanges map[string]*OperationTraitChanges `json:"operationTraits,omitempty" yaml:"operationTraits,omitempty"`
MessageTraitChanges map[string]*MessageTraitChanges `json:"messageTraits,omitempty" yaml:"messageTraits,omitempty"`
ServerBindingsChanges map[string]*ServerBindingsChanges `json:"serverBindings,omitempty" yaml:"serverBindings,omitempty"`
ChannelBindingsChanges map[string]*ChannelBindingsChanges `json:"channelBindings,omitempty" yaml:"channelBindings,omitempty"`
OperationBindingsChanges map[string]*OperationBindingsChanges `json:"operationBindings,omitempty" yaml:"operationBindings,omitempty"`
MessageBindingsChanges map[string]*MessageBindingsChanges `json:"messageBindings,omitempty" yaml:"messageBindings,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
ComponentsChanges represents changes made to the Components object of an AsyncAPI document.
func CompareComponents ¶
func CompareComponents(l, r *lowasync.Components, configs ...*BreakingRulesConfig) *ComponentsChanges
CompareComponents compares two AsyncAPI Components objects and returns a pointer to ComponentsChanges, or nil if nothing changed.
Schemas are libopenapi base objects, so their comparison is delegated to libopenapi's what-changed schema comparator.
func (*ComponentsChanges) GetAllChanges ¶
func (c *ComponentsChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between Components objects.
func (*ComponentsChanges) TotalBreakingChanges ¶
func (c *ComponentsChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*ComponentsChanges) TotalChanges ¶
func (c *ComponentsChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type ComponentsRules ¶
type ComponentsRules struct {
Schemas *BreakingChangeRule `json:"schemas,omitempty" yaml:"schemas,omitempty"`
Servers *BreakingChangeRule `json:"servers,omitempty" yaml:"servers,omitempty"`
Channels *BreakingChangeRule `json:"channels,omitempty" yaml:"channels,omitempty"`
Operations *BreakingChangeRule `json:"operations,omitempty" yaml:"operations,omitempty"`
Messages *BreakingChangeRule `json:"messages,omitempty" yaml:"messages,omitempty"`
SecuritySchemes *BreakingChangeRule `json:"securitySchemes,omitempty" yaml:"securitySchemes,omitempty"`
ServerVariables *BreakingChangeRule `json:"serverVariables,omitempty" yaml:"serverVariables,omitempty"`
Parameters *BreakingChangeRule `json:"parameters,omitempty" yaml:"parameters,omitempty"`
CorrelationIDs *BreakingChangeRule `json:"correlationIds,omitempty" yaml:"correlationIds,omitempty"`
Replies *BreakingChangeRule `json:"replies,omitempty" yaml:"replies,omitempty"`
ReplyAddresses *BreakingChangeRule `json:"replyAddresses,omitempty" yaml:"replyAddresses,omitempty"`
ExternalDocs *BreakingChangeRule `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
Tags *BreakingChangeRule `json:"tags,omitempty" yaml:"tags,omitempty"`
OperationTraits *BreakingChangeRule `json:"operationTraits,omitempty" yaml:"operationTraits,omitempty"`
MessageTraits *BreakingChangeRule `json:"messageTraits,omitempty" yaml:"messageTraits,omitempty"`
ServerBindings *BreakingChangeRule `json:"serverBindings,omitempty" yaml:"serverBindings,omitempty"`
ChannelBindings *BreakingChangeRule `json:"channelBindings,omitempty" yaml:"channelBindings,omitempty"`
OperationBindings *BreakingChangeRule `json:"operationBindings,omitempty" yaml:"operationBindings,omitempty"`
MessageBindings *BreakingChangeRule `json:"messageBindings,omitempty" yaml:"messageBindings,omitempty"`
}
ComponentsRules defines breaking rules for the Components object maps.
type ConfigValidationError ¶
type ConfigValidationError struct {
// Message is a human-readable description of the issue.
Message string
// Path is the YAML path where the issue was found (e.g., "channel.address").
Path string
// Line is the 1-based line number in the YAML source (0 if unknown).
Line int
// Column is the 1-based column number in the YAML source (0 if unknown).
Column int
// FoundKey is the misplaced key that was detected.
FoundKey string
// SuggestedPath is where the key should be placed instead.
SuggestedPath string
}
ConfigValidationError represents a single validation issue in a breaking rules config.
func (*ConfigValidationError) Error ¶
func (e *ConfigValidationError) Error() string
Error implements the error interface.
type ConfigValidationResult ¶
type ConfigValidationResult struct {
// Errors contains all validation issues found.
Errors []*ConfigValidationError
}
ConfigValidationResult holds the results of validating a breaking rules config.
func ValidateBreakingRulesConfigYAML ¶
func ValidateBreakingRulesConfigYAML(yamlBytes []byte) *ConfigValidationResult
ValidateBreakingRulesConfigYAML validates raw YAML bytes for a breaking rules config. It detects misplaced nested configurations (e.g., "channel.tag" should be just "tag" at the top level) and returns all validation errors found. Returns nil if the configuration is valid.
func (*ConfigValidationResult) Error ¶
func (r *ConfigValidationResult) Error() string
Error implements the error interface, joining all errors.
func (*ConfigValidationResult) HasErrors ¶
func (r *ConfigValidationResult) HasErrors() bool
HasErrors returns true if any validation errors were found.
type ContactChanges ¶
type ContactChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
ContactChanges represents changes made to the Contact object of an AsyncAPI document.
func CompareContact ¶
func CompareContact(l, r *base.Contact, configs ...*BreakingRulesConfig) *ContactChanges
CompareContact compares two Contact objects and returns a pointer to ContactChanges, or nil if nothing changed.
Contact is a libopenapi base object, but the comparison is implemented locally so breaking classification resolves against this package's AsyncAPI breaking-rules configuration rather than libopenapi's global OpenAPI configuration.
func (*ContactChanges) GetAllChanges ¶
func (c *ContactChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between Contact objects.
func (*ContactChanges) TotalBreakingChanges ¶
func (c *ContactChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*ContactChanges) TotalChanges ¶
func (c *ContactChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type ContactRules ¶
type ContactRules struct {
Name *BreakingChangeRule `json:"name,omitempty" yaml:"name,omitempty"`
URL *BreakingChangeRule `json:"url,omitempty" yaml:"url,omitempty"`
Email *BreakingChangeRule `json:"email,omitempty" yaml:"email,omitempty"`
}
ContactRules defines breaking rules for the Contact object properties.
type CorrelationIDChanges ¶
type CorrelationIDChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
CorrelationIDChanges represents changes made to an AsyncAPI Correlation ID object.
func CompareCorrelationID ¶
func CompareCorrelationID(l, r *lowasync.CorrelationID, configs ...*BreakingRulesConfig) *CorrelationIDChanges
CompareCorrelationID compares two AsyncAPI Correlation ID objects and returns a pointer to CorrelationIDChanges, or nil if nothing changed.
func (*CorrelationIDChanges) GetAllChanges ¶
func (c *CorrelationIDChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between Correlation ID objects.
func (*CorrelationIDChanges) TotalBreakingChanges ¶
func (c *CorrelationIDChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*CorrelationIDChanges) TotalChanges ¶
func (c *CorrelationIDChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type CorrelationIDRules ¶
type CorrelationIDRules struct {
Description *BreakingChangeRule `json:"description,omitempty" yaml:"description,omitempty"`
Location *BreakingChangeRule `json:"location,omitempty" yaml:"location,omitempty"`
}
CorrelationIDRules defines breaking rules for the Correlation ID object properties.
type DocumentChanges ¶
type DocumentChanges struct {
*PropertyChanges
InfoChanges *InfoChanges `json:"info,omitempty" yaml:"info,omitempty"`
ServerChanges map[string]*ServerChanges `json:"servers,omitempty" yaml:"servers,omitempty"`
ChannelChanges map[string]*ChannelChanges `json:"channels,omitempty" yaml:"channels,omitempty"`
OperationChanges map[string]*OperationChanges `json:"operations,omitempty" yaml:"operations,omitempty"`
ComponentsChanges *ComponentsChanges `json:"components,omitempty" yaml:"components,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
DocumentChanges represents all the changes made between two AsyncAPI documents.
func CompareDocuments ¶
func CompareDocuments(l, r *lowasync.AsyncAPI) *DocumentChanges
CompareDocuments compares two AsyncAPI documents and returns a pointer to DocumentChanges describing everything that changed, or nil if nothing changed.
func CompareDocumentsWithConfig ¶
func CompareDocumentsWithConfig(l, r *lowasync.AsyncAPI, config *BreakingRulesConfig) *DocumentChanges
CompareDocumentsWithConfig compares two AsyncAPI documents using config for this call only. A nil config selects the default rules, independent of any process-global active configuration. Custom-config comparisons are serialized so their rules cannot cross-talk with concurrent comparisons or global configuration changes.
func (*DocumentChanges) GetAllChanges ¶
func (d *DocumentChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between AsyncAPI documents.
func (*DocumentChanges) TotalBreakingChanges ¶
func (d *DocumentChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*DocumentChanges) TotalChanges ¶
func (d *DocumentChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type ExtensionChanges ¶
type ExtensionChanges = wcmodel.ExtensionChanges
ExtensionChanges represents any changes to custom extensions defined for an AsyncAPI object.
func CheckExtensions ¶
func CheckExtensions[T low.HasExtensions[T]](l, r T) *ExtensionChanges
CheckExtensions unpacks a left and right model that contains extensions, compares them and returns a pointer to ExtensionChanges. If nothing changed, nil is returned.
type ExternalDocChanges ¶
type ExternalDocChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
ExternalDocChanges represents changes made to a single AsyncAPI ExternalDoc object.
func CompareExternalDocs ¶
func CompareExternalDocs(l, r *lowasync.ExternalDoc, configs ...*BreakingRulesConfig) *ExternalDocChanges
CompareExternalDocs compares two AsyncAPI ExternalDoc objects and returns a pointer to ExternalDocChanges, or nil if nothing changed.
func (*ExternalDocChanges) GetAllChanges ¶
func (e *ExternalDocChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between ExternalDoc objects.
func (*ExternalDocChanges) TotalBreakingChanges ¶
func (e *ExternalDocChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*ExternalDocChanges) TotalChanges ¶
func (e *ExternalDocChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type ExternalDocsRules ¶
type ExternalDocsRules struct {
URL *BreakingChangeRule `json:"url,omitempty" yaml:"url,omitempty"`
Description *BreakingChangeRule `json:"description,omitempty" yaml:"description,omitempty"`
}
ExternalDocsRules defines breaking rules for the External Documentation object properties.
type HTTPChannelBindingChanges ¶
type HTTPChannelBindingChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
HTTPChannelBindingChanges represents changes made to an AsyncAPI HTTP Channel Binding object.
func CompareHTTPChannelBinding ¶
func CompareHTTPChannelBinding(l, r *lowasync.HTTPChannelBinding, configs ...*BreakingRulesConfig) *HTTPChannelBindingChanges
CompareHTTPChannelBinding compares two AsyncAPI HTTP Channel Binding objects and returns a pointer to HTTPChannelBindingChanges, or nil if nothing changed. The binding carries no fields beyond extensions.
func (*HTTPChannelBindingChanges) GetAllChanges ¶
func (h *HTTPChannelBindingChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between HTTP Channel Binding objects.
func (*HTTPChannelBindingChanges) TotalBreakingChanges ¶
func (h *HTTPChannelBindingChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*HTTPChannelBindingChanges) TotalChanges ¶
func (h *HTTPChannelBindingChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type HTTPMessageBindingChanges ¶
type HTTPMessageBindingChanges struct {
*PropertyChanges
HeadersChanges *wcmodel.SchemaChanges `json:"headers,omitempty" yaml:"headers,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
HTTPMessageBindingChanges represents changes made to an AsyncAPI HTTP Message Binding object.
func CompareHTTPMessageBinding ¶
func CompareHTTPMessageBinding(l, r *lowasync.HTTPMessageBinding, configs ...*BreakingRulesConfig) *HTTPMessageBindingChanges
CompareHTTPMessageBinding compares two AsyncAPI HTTP Message Binding objects and returns a pointer to HTTPMessageBindingChanges, or nil if nothing changed.
The headers field is a schema, so its comparison is delegated to libopenapi's what-changed schema comparator.
func (*HTTPMessageBindingChanges) GetAllChanges ¶
func (h *HTTPMessageBindingChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between HTTP Message Binding objects.
func (*HTTPMessageBindingChanges) TotalBreakingChanges ¶
func (h *HTTPMessageBindingChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*HTTPMessageBindingChanges) TotalChanges ¶
func (h *HTTPMessageBindingChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type HTTPMessageBindingRules ¶
type HTTPMessageBindingRules struct {
Headers *BreakingChangeRule `json:"headers,omitempty" yaml:"headers,omitempty"`
StatusCode *BreakingChangeRule `json:"statusCode,omitempty" yaml:"statusCode,omitempty"`
BindingVersion *BreakingChangeRule `json:"bindingVersion,omitempty" yaml:"bindingVersion,omitempty"`
}
HTTPMessageBindingRules defines breaking rules for the HTTP Message Binding properties.
type HTTPOperationBindingChanges ¶
type HTTPOperationBindingChanges struct {
*PropertyChanges
QueryChanges *wcmodel.SchemaChanges `json:"query,omitempty" yaml:"query,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
HTTPOperationBindingChanges represents changes made to an AsyncAPI HTTP Operation Binding object.
func CompareHTTPOperationBinding ¶
func CompareHTTPOperationBinding(l, r *lowasync.HTTPOperationBinding, configs ...*BreakingRulesConfig) *HTTPOperationBindingChanges
CompareHTTPOperationBinding compares two AsyncAPI HTTP Operation Binding objects and returns a pointer to HTTPOperationBindingChanges, or nil if nothing changed.
The query field is a schema, so its comparison is delegated to libopenapi's what-changed schema comparator.
func (*HTTPOperationBindingChanges) GetAllChanges ¶
func (h *HTTPOperationBindingChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between HTTP Operation Binding objects.
func (*HTTPOperationBindingChanges) TotalBreakingChanges ¶
func (h *HTTPOperationBindingChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*HTTPOperationBindingChanges) TotalChanges ¶
func (h *HTTPOperationBindingChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type HTTPOperationBindingRules ¶
type HTTPOperationBindingRules struct {
Method *BreakingChangeRule `json:"method,omitempty" yaml:"method,omitempty"`
Query *BreakingChangeRule `json:"query,omitempty" yaml:"query,omitempty"`
BindingVersion *BreakingChangeRule `json:"bindingVersion,omitempty" yaml:"bindingVersion,omitempty"`
}
HTTPOperationBindingRules defines breaking rules for the HTTP Operation Binding properties.
type HTTPServerBindingChanges ¶
type HTTPServerBindingChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
HTTPServerBindingChanges represents changes made to an AsyncAPI HTTP Server Binding object.
func CompareHTTPServerBinding ¶
func CompareHTTPServerBinding(l, r *lowasync.HTTPServerBinding, configs ...*BreakingRulesConfig) *HTTPServerBindingChanges
CompareHTTPServerBinding compares two AsyncAPI HTTP Server Binding objects and returns a pointer to HTTPServerBindingChanges, or nil if nothing changed. The binding carries no fields beyond extensions.
func (*HTTPServerBindingChanges) GetAllChanges ¶
func (h *HTTPServerBindingChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between HTTP Server Binding objects.
func (*HTTPServerBindingChanges) TotalBreakingChanges ¶
func (h *HTTPServerBindingChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*HTTPServerBindingChanges) TotalChanges ¶
func (h *HTTPServerBindingChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type InfoChanges ¶
type InfoChanges struct {
*PropertyChanges
ContactChanges *ContactChanges `json:"contact,omitempty" yaml:"contact,omitempty"`
LicenseChanges *LicenseChanges `json:"license,omitempty" yaml:"license,omitempty"`
TagChanges map[string]*TagChanges `json:"tags,omitempty" yaml:"tags,omitempty"`
ExternalDocChanges *ExternalDocChanges `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
InfoChanges represents changes made to the Info object of an AsyncAPI document.
func CompareInfo ¶
func CompareInfo(l, r *lowasync.Info, configs ...*BreakingRulesConfig) *InfoChanges
CompareInfo compares two AsyncAPI Info objects and returns a pointer to InfoChanges, or nil if nothing changed.
Contact and License are libopenapi base objects, but they are compared with this package's local comparators so breaking classification follows the AsyncAPI rules.
func (*InfoChanges) GetAllChanges ¶
func (i *InfoChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between Info objects.
func (*InfoChanges) TotalBreakingChanges ¶
func (i *InfoChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*InfoChanges) TotalChanges ¶
func (i *InfoChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type InfoRules ¶
type InfoRules struct {
Title *BreakingChangeRule `json:"title,omitempty" yaml:"title,omitempty"`
Version *BreakingChangeRule `json:"version,omitempty" yaml:"version,omitempty"`
Description *BreakingChangeRule `json:"description,omitempty" yaml:"description,omitempty"`
TermsOfService *BreakingChangeRule `json:"termsOfService,omitempty" yaml:"termsOfService,omitempty"`
Contact *BreakingChangeRule `json:"contact,omitempty" yaml:"contact,omitempty"`
License *BreakingChangeRule `json:"license,omitempty" yaml:"license,omitempty"`
Tags *BreakingChangeRule `json:"tags,omitempty" yaml:"tags,omitempty"`
ExternalDocs *BreakingChangeRule `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
}
InfoRules defines breaking rules for the Info object properties.
type KafkaChannelBindingChanges ¶
type KafkaChannelBindingChanges struct {
*PropertyChanges
TopicConfigurationChanges *KafkaTopicConfigurationChanges `json:"topicConfiguration,omitempty" yaml:"topicConfiguration,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
KafkaChannelBindingChanges represents changes made to an AsyncAPI Kafka Channel Binding object.
func CompareKafkaChannelBinding ¶
func CompareKafkaChannelBinding(l, r *lowasync.KafkaChannelBinding, configs ...*BreakingRulesConfig) *KafkaChannelBindingChanges
CompareKafkaChannelBinding compares two AsyncAPI Kafka Channel Binding objects and returns a pointer to KafkaChannelBindingChanges, or nil if nothing changed.
func (*KafkaChannelBindingChanges) GetAllChanges ¶
func (k *KafkaChannelBindingChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between Kafka Channel Binding objects.
func (*KafkaChannelBindingChanges) TotalBreakingChanges ¶
func (k *KafkaChannelBindingChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*KafkaChannelBindingChanges) TotalChanges ¶
func (k *KafkaChannelBindingChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type KafkaChannelBindingRules ¶
type KafkaChannelBindingRules struct {
Topic *BreakingChangeRule `json:"topic,omitempty" yaml:"topic,omitempty"`
Partitions *BreakingChangeRule `json:"partitions,omitempty" yaml:"partitions,omitempty"`
Replicas *BreakingChangeRule `json:"replicas,omitempty" yaml:"replicas,omitempty"`
TopicConfiguration *BreakingChangeRule `json:"topicConfiguration,omitempty" yaml:"topicConfiguration,omitempty"`
BindingVersion *BreakingChangeRule `json:"bindingVersion,omitempty" yaml:"bindingVersion,omitempty"`
}
KafkaChannelBindingRules defines breaking rules for the Kafka Channel Binding properties.
type KafkaMessageBindingChanges ¶
type KafkaMessageBindingChanges struct {
*PropertyChanges
KeyChanges *wcmodel.SchemaChanges `json:"key,omitempty" yaml:"key,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
KafkaMessageBindingChanges represents changes made to an AsyncAPI Kafka Message Binding object.
func CompareKafkaMessageBinding ¶
func CompareKafkaMessageBinding(l, r *lowasync.KafkaMessageBinding, configs ...*BreakingRulesConfig) *KafkaMessageBindingChanges
CompareKafkaMessageBinding compares two AsyncAPI Kafka Message Binding objects and returns a pointer to KafkaMessageBindingChanges, or nil if nothing changed.
The key field is a schema, so its comparison is delegated to libopenapi's what-changed schema comparator.
func (*KafkaMessageBindingChanges) GetAllChanges ¶
func (k *KafkaMessageBindingChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between Kafka Message Binding objects.
func (*KafkaMessageBindingChanges) TotalBreakingChanges ¶
func (k *KafkaMessageBindingChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*KafkaMessageBindingChanges) TotalChanges ¶
func (k *KafkaMessageBindingChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type KafkaMessageBindingRules ¶
type KafkaMessageBindingRules struct {
Key *BreakingChangeRule `json:"key,omitempty" yaml:"key,omitempty"`
SchemaIDLocation *BreakingChangeRule `json:"schemaIdLocation,omitempty" yaml:"schemaIdLocation,omitempty"`
SchemaIDPayloadEncoding *BreakingChangeRule `json:"schemaIdPayloadEncoding,omitempty" yaml:"schemaIdPayloadEncoding,omitempty"`
SchemaLookupStrategy *BreakingChangeRule `json:"schemaLookupStrategy,omitempty" yaml:"schemaLookupStrategy,omitempty"`
BindingVersion *BreakingChangeRule `json:"bindingVersion,omitempty" yaml:"bindingVersion,omitempty"`
}
KafkaMessageBindingRules defines breaking rules for the Kafka Message Binding properties.
type KafkaOperationBindingChanges ¶
type KafkaOperationBindingChanges struct {
*PropertyChanges
GroupIDChanges *wcmodel.SchemaChanges `json:"groupId,omitempty" yaml:"groupId,omitempty"`
ClientIDChanges *wcmodel.SchemaChanges `json:"clientId,omitempty" yaml:"clientId,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
KafkaOperationBindingChanges represents changes made to an AsyncAPI Kafka Operation Binding object.
func CompareKafkaOperationBinding ¶
func CompareKafkaOperationBinding(l, r *lowasync.KafkaOperationBinding, configs ...*BreakingRulesConfig) *KafkaOperationBindingChanges
CompareKafkaOperationBinding compares two AsyncAPI Kafka Operation Binding objects and returns a pointer to KafkaOperationBindingChanges, or nil if nothing changed.
The groupId and clientId fields are schemas, so their comparison is delegated to libopenapi's what-changed schema comparator.
func (*KafkaOperationBindingChanges) GetAllChanges ¶
func (k *KafkaOperationBindingChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between Kafka Operation Binding objects.
func (*KafkaOperationBindingChanges) TotalBreakingChanges ¶
func (k *KafkaOperationBindingChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*KafkaOperationBindingChanges) TotalChanges ¶
func (k *KafkaOperationBindingChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type KafkaOperationBindingRules ¶
type KafkaOperationBindingRules struct {
GroupID *BreakingChangeRule `json:"groupId,omitempty" yaml:"groupId,omitempty"`
ClientID *BreakingChangeRule `json:"clientId,omitempty" yaml:"clientId,omitempty"`
BindingVersion *BreakingChangeRule `json:"bindingVersion,omitempty" yaml:"bindingVersion,omitempty"`
}
KafkaOperationBindingRules defines breaking rules for the Kafka Operation Binding properties.
type KafkaServerBindingChanges ¶
type KafkaServerBindingChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
KafkaServerBindingChanges represents changes made to an AsyncAPI Kafka Server Binding object.
func CompareKafkaServerBinding ¶
func CompareKafkaServerBinding(l, r *lowasync.KafkaServerBinding, configs ...*BreakingRulesConfig) *KafkaServerBindingChanges
CompareKafkaServerBinding compares two AsyncAPI Kafka Server Binding objects and returns a pointer to KafkaServerBindingChanges, or nil if nothing changed.
func (*KafkaServerBindingChanges) GetAllChanges ¶
func (k *KafkaServerBindingChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between Kafka Server Binding objects.
func (*KafkaServerBindingChanges) TotalBreakingChanges ¶
func (k *KafkaServerBindingChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*KafkaServerBindingChanges) TotalChanges ¶
func (k *KafkaServerBindingChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type KafkaServerBindingRules ¶
type KafkaServerBindingRules struct {
SchemaRegistryURL *BreakingChangeRule `json:"schemaRegistryUrl,omitempty" yaml:"schemaRegistryUrl,omitempty"`
SchemaRegistryVendor *BreakingChangeRule `json:"schemaRegistryVendor,omitempty" yaml:"schemaRegistryVendor,omitempty"`
BindingVersion *BreakingChangeRule `json:"bindingVersion,omitempty" yaml:"bindingVersion,omitempty"`
}
KafkaServerBindingRules defines breaking rules for the Kafka Server Binding properties.
type KafkaTopicConfigurationChanges ¶
type KafkaTopicConfigurationChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
KafkaTopicConfigurationChanges represents changes made to an AsyncAPI Kafka Topic Configuration object.
func CompareKafkaTopicConfiguration ¶
func CompareKafkaTopicConfiguration(l, r *lowasync.KafkaTopicConfiguration, configs ...*BreakingRulesConfig) *KafkaTopicConfigurationChanges
CompareKafkaTopicConfiguration compares two AsyncAPI Kafka Topic Configuration objects and returns a pointer to KafkaTopicConfigurationChanges, or nil if nothing changed.
func (*KafkaTopicConfigurationChanges) GetAllChanges ¶
func (k *KafkaTopicConfigurationChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between Kafka Topic Configuration objects.
func (*KafkaTopicConfigurationChanges) TotalBreakingChanges ¶
func (k *KafkaTopicConfigurationChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*KafkaTopicConfigurationChanges) TotalChanges ¶
func (k *KafkaTopicConfigurationChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type KafkaTopicConfigurationRules ¶
type KafkaTopicConfigurationRules struct {
CleanupPolicy *BreakingChangeRule `json:"cleanup.policy,omitempty" yaml:"cleanup.policy,omitempty"`
RetentionMs *BreakingChangeRule `json:"retention.ms,omitempty" yaml:"retention.ms,omitempty"`
RetentionBytes *BreakingChangeRule `json:"retention.bytes,omitempty" yaml:"retention.bytes,omitempty"`
DeleteRetentionMs *BreakingChangeRule `json:"delete.retention.ms,omitempty" yaml:"delete.retention.ms,omitempty"`
MaxMessageBytes *BreakingChangeRule `json:"max.message.bytes,omitempty" yaml:"max.message.bytes,omitempty"`
ConfluentKeySchemaValidation *BreakingChangeRule `json:"confluent.key.schema.validation,omitempty" yaml:"confluent.key.schema.validation,omitempty"`
ConfluentKeySubjectNameStrategy *BreakingChangeRule `json:"confluent.key.subject.name.strategy,omitempty" yaml:"confluent.key.subject.name.strategy,omitempty"`
ConfluentValueSchemaValidation *BreakingChangeRule `json:"confluent.value.schema.validation,omitempty" yaml:"confluent.value.schema.validation,omitempty"`
ConfluentValueSubjectNameStrategy *BreakingChangeRule `json:"confluent.value.subject.name.strategy,omitempty" yaml:"confluent.value.subject.name.strategy,omitempty"`
}
KafkaTopicConfigurationRules defines breaking rules for the Kafka Topic Configuration properties.
type LicenseChanges ¶
type LicenseChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
LicenseChanges represents changes made to the License object of an AsyncAPI document.
func CompareLicense ¶
func CompareLicense(l, r *base.License, configs ...*BreakingRulesConfig) *LicenseChanges
CompareLicense compares two License objects and returns a pointer to LicenseChanges, or nil if nothing changed.
License is a libopenapi base object, but the comparison is implemented locally so breaking classification resolves against this package's AsyncAPI breaking-rules configuration rather than libopenapi's global OpenAPI configuration.
func (*LicenseChanges) GetAllChanges ¶
func (lc *LicenseChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between License objects.
func (*LicenseChanges) TotalBreakingChanges ¶
func (lc *LicenseChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*LicenseChanges) TotalChanges ¶
func (lc *LicenseChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type LicenseRules ¶
type LicenseRules struct {
Name *BreakingChangeRule `json:"name,omitempty" yaml:"name,omitempty"`
Identifier *BreakingChangeRule `json:"identifier,omitempty" yaml:"identifier,omitempty"`
URL *BreakingChangeRule `json:"url,omitempty" yaml:"url,omitempty"`
}
LicenseRules defines breaking rules for the License object properties.
type MQTTLastWillChanges ¶
type MQTTLastWillChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
MQTTLastWillChanges represents changes made to an AsyncAPI MQTT Last Will object.
func CompareMQTTLastWill ¶
func CompareMQTTLastWill(l, r *lowasync.MQTTLastWill, configs ...*BreakingRulesConfig) *MQTTLastWillChanges
CompareMQTTLastWill compares two AsyncAPI MQTT Last Will objects and returns a pointer to MQTTLastWillChanges, or nil if nothing changed.
func (*MQTTLastWillChanges) GetAllChanges ¶
func (m *MQTTLastWillChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between MQTT Last Will objects.
func (*MQTTLastWillChanges) TotalBreakingChanges ¶
func (m *MQTTLastWillChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*MQTTLastWillChanges) TotalChanges ¶
func (m *MQTTLastWillChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type MQTTLastWillRules ¶
type MQTTLastWillRules struct {
Topic *BreakingChangeRule `json:"topic,omitempty" yaml:"topic,omitempty"`
QoS *BreakingChangeRule `json:"qos,omitempty" yaml:"qos,omitempty"`
Message *BreakingChangeRule `json:"message,omitempty" yaml:"message,omitempty"`
Retain *BreakingChangeRule `json:"retain,omitempty" yaml:"retain,omitempty"`
}
MQTTLastWillRules defines breaking rules for the MQTT Last Will properties.
type MQTTMessageBindingChanges ¶
type MQTTMessageBindingChanges struct {
*PropertyChanges
CorrelationDataChanges *wcmodel.SchemaChanges `json:"correlationData,omitempty" yaml:"correlationData,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
MQTTMessageBindingChanges represents changes made to an AsyncAPI MQTT Message Binding object.
func CompareMQTTMessageBinding ¶
func CompareMQTTMessageBinding(l, r *lowasync.MQTTMessageBinding, configs ...*BreakingRulesConfig) *MQTTMessageBindingChanges
CompareMQTTMessageBinding compares two AsyncAPI MQTT Message Binding objects and returns a pointer to MQTTMessageBindingChanges, or nil if nothing changed.
The correlationData field is a schema, so its comparison is delegated to libopenapi's what-changed schema comparator.
func (*MQTTMessageBindingChanges) GetAllChanges ¶
func (m *MQTTMessageBindingChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between MQTT Message Binding objects.
func (*MQTTMessageBindingChanges) TotalBreakingChanges ¶
func (m *MQTTMessageBindingChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*MQTTMessageBindingChanges) TotalChanges ¶
func (m *MQTTMessageBindingChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type MQTTMessageBindingRules ¶
type MQTTMessageBindingRules struct {
PayloadFormatIndicator *BreakingChangeRule `json:"payloadFormatIndicator,omitempty" yaml:"payloadFormatIndicator,omitempty"`
CorrelationData *BreakingChangeRule `json:"correlationData,omitempty" yaml:"correlationData,omitempty"`
ContentType *BreakingChangeRule `json:"contentType,omitempty" yaml:"contentType,omitempty"`
ResponseTopic *BreakingChangeRule `json:"responseTopic,omitempty" yaml:"responseTopic,omitempty"`
BindingVersion *BreakingChangeRule `json:"bindingVersion,omitempty" yaml:"bindingVersion,omitempty"`
}
MQTTMessageBindingRules defines breaking rules for the MQTT Message Binding properties.
type MQTTOperationBindingChanges ¶
type MQTTOperationBindingChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
MQTTOperationBindingChanges represents changes made to an AsyncAPI MQTT Operation Binding object.
func CompareMQTTOperationBinding ¶
func CompareMQTTOperationBinding(l, r *lowasync.MQTTOperationBinding, configs ...*BreakingRulesConfig) *MQTTOperationBindingChanges
CompareMQTTOperationBinding compares two AsyncAPI MQTT Operation Binding objects and returns a pointer to MQTTOperationBindingChanges, or nil if nothing changed.
func (*MQTTOperationBindingChanges) GetAllChanges ¶
func (m *MQTTOperationBindingChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between MQTT Operation Binding objects.
func (*MQTTOperationBindingChanges) TotalBreakingChanges ¶
func (m *MQTTOperationBindingChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*MQTTOperationBindingChanges) TotalChanges ¶
func (m *MQTTOperationBindingChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type MQTTOperationBindingRules ¶
type MQTTOperationBindingRules struct {
QoS *BreakingChangeRule `json:"qos,omitempty" yaml:"qos,omitempty"`
Retain *BreakingChangeRule `json:"retain,omitempty" yaml:"retain,omitempty"`
BindingVersion *BreakingChangeRule `json:"bindingVersion,omitempty" yaml:"bindingVersion,omitempty"`
}
MQTTOperationBindingRules defines breaking rules for the MQTT Operation Binding properties.
type MQTTServerBindingChanges ¶
type MQTTServerBindingChanges struct {
*PropertyChanges
LastWillChanges *MQTTLastWillChanges `json:"lastWill,omitempty" yaml:"lastWill,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
MQTTServerBindingChanges represents changes made to an AsyncAPI MQTT Server Binding object.
func CompareMQTTServerBinding ¶
func CompareMQTTServerBinding(l, r *lowasync.MQTTServerBinding, configs ...*BreakingRulesConfig) *MQTTServerBindingChanges
CompareMQTTServerBinding compares two AsyncAPI MQTT Server Binding objects and returns a pointer to MQTTServerBindingChanges, or nil if nothing changed.
func (*MQTTServerBindingChanges) GetAllChanges ¶
func (m *MQTTServerBindingChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between MQTT Server Binding objects.
func (*MQTTServerBindingChanges) TotalBreakingChanges ¶
func (m *MQTTServerBindingChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*MQTTServerBindingChanges) TotalChanges ¶
func (m *MQTTServerBindingChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type MQTTServerBindingRules ¶
type MQTTServerBindingRules struct {
ClientID *BreakingChangeRule `json:"clientId,omitempty" yaml:"clientId,omitempty"`
CleanSession *BreakingChangeRule `json:"cleanSession,omitempty" yaml:"cleanSession,omitempty"`
LastWill *BreakingChangeRule `json:"lastWill,omitempty" yaml:"lastWill,omitempty"`
KeepAlive *BreakingChangeRule `json:"keepAlive,omitempty" yaml:"keepAlive,omitempty"`
SessionExpiryInterval *BreakingChangeRule `json:"sessionExpiryInterval,omitempty" yaml:"sessionExpiryInterval,omitempty"`
MaximumPacketSize *BreakingChangeRule `json:"maximumPacketSize,omitempty" yaml:"maximumPacketSize,omitempty"`
BindingVersion *BreakingChangeRule `json:"bindingVersion,omitempty" yaml:"bindingVersion,omitempty"`
}
MQTTServerBindingRules defines breaking rules for the MQTT Server Binding properties.
type MessageBindingsChanges ¶
type MessageBindingsChanges struct {
*PropertyChanges
HTTPChanges *HTTPMessageBindingChanges `json:"http,omitempty" yaml:"http,omitempty"`
KafkaChanges *KafkaMessageBindingChanges `json:"kafka,omitempty" yaml:"kafka,omitempty"`
AMQPChanges *AMQPMessageBindingChanges `json:"amqp,omitempty" yaml:"amqp,omitempty"`
MQTTChanges *MQTTMessageBindingChanges `json:"mqtt,omitempty" yaml:"mqtt,omitempty"`
SQSChanges *SQSMessageBindingChanges `json:"sqs,omitempty" yaml:"sqs,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
MessageBindingsChanges represents changes made to an AsyncAPI MessageBindings object.
func CompareMessageBindings ¶
func CompareMessageBindings(l, r *lowasync.MessageBindings, configs ...*BreakingRulesConfig) *MessageBindingsChanges
CompareMessageBindings compares two AsyncAPI MessageBindings objects and returns a pointer to MessageBindingsChanges, or nil if nothing changed.
func (*MessageBindingsChanges) GetAllChanges ¶
func (m *MessageBindingsChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between MessageBindings objects.
func (*MessageBindingsChanges) TotalBreakingChanges ¶
func (m *MessageBindingsChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*MessageBindingsChanges) TotalChanges ¶
func (m *MessageBindingsChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type MessageBindingsRules ¶
type MessageBindingsRules struct {
HTTP *BreakingChangeRule `json:"http,omitempty" yaml:"http,omitempty"`
Kafka *BreakingChangeRule `json:"kafka,omitempty" yaml:"kafka,omitempty"`
AMQP *BreakingChangeRule `json:"amqp,omitempty" yaml:"amqp,omitempty"`
MQTT *BreakingChangeRule `json:"mqtt,omitempty" yaml:"mqtt,omitempty"`
SQS *BreakingChangeRule `json:"sqs,omitempty" yaml:"sqs,omitempty"`
}
MessageBindingsRules defines breaking rules for the Message Bindings container properties.
type MessageChanges ¶
type MessageChanges struct {
*PropertyChanges
HeadersChanges *wcmodel.SchemaChanges `json:"headers,omitempty" yaml:"headers,omitempty"`
PayloadChanges *wcmodel.SchemaChanges `json:"payload,omitempty" yaml:"payload,omitempty"`
CorrelationIDChanges *CorrelationIDChanges `json:"correlationId,omitempty" yaml:"correlationId,omitempty"`
TagChanges map[string]*TagChanges `json:"tags,omitempty" yaml:"tags,omitempty"`
ExternalDocChanges *ExternalDocChanges `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
BindingsChanges *MessageBindingsChanges `json:"bindings,omitempty" yaml:"bindings,omitempty"`
ExampleChanges map[string]*MessageExampleChanges `json:"examples,omitempty" yaml:"examples,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
MessageChanges represents changes made to an AsyncAPI Message object.
func CompareMessages ¶
func CompareMessages(l, r *lowasync.Message, configs ...*BreakingRulesConfig) *MessageChanges
CompareMessages compares two AsyncAPI Message objects and returns a pointer to MessageChanges, or nil if nothing changed.
Headers and payload are schemas, so their comparison is delegated to libopenapi's what-changed schema comparator. Examples are keyed by name (hash identity for unnamed entries). Traits have no natural identity key, so an edited trait reports as one removal plus one addition.
func (*MessageChanges) GetAllChanges ¶
func (m *MessageChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between Message objects.
func (*MessageChanges) TotalBreakingChanges ¶
func (m *MessageChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*MessageChanges) TotalChanges ¶
func (m *MessageChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type MessageExampleChanges ¶
type MessageExampleChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
MessageExampleChanges represents changes made to an AsyncAPI Message Example object.
func CompareMessageExamples ¶
func CompareMessageExamples(l, r *lowasync.MessageExample, configs ...*BreakingRulesConfig) *MessageExampleChanges
CompareMessageExamples compares two AsyncAPI Message Example objects and returns a pointer to MessageExampleChanges, or nil if nothing changed.
Headers and payload are free-form yaml nodes, so they are compared structurally as raw nodes.
func (*MessageExampleChanges) GetAllChanges ¶
func (m *MessageExampleChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between Message Example objects.
func (*MessageExampleChanges) TotalBreakingChanges ¶
func (m *MessageExampleChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*MessageExampleChanges) TotalChanges ¶
func (m *MessageExampleChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type MessageExampleRules ¶
type MessageExampleRules struct {
Headers *BreakingChangeRule `json:"headers,omitempty" yaml:"headers,omitempty"`
Payload *BreakingChangeRule `json:"payload,omitempty" yaml:"payload,omitempty"`
Name *BreakingChangeRule `json:"name,omitempty" yaml:"name,omitempty"`
Summary *BreakingChangeRule `json:"summary,omitempty" yaml:"summary,omitempty"`
}
MessageExampleRules defines breaking rules for the Message Example object properties.
type MessageRules ¶
type MessageRules struct {
Headers *BreakingChangeRule `json:"headers,omitempty" yaml:"headers,omitempty"`
Payload *BreakingChangeRule `json:"payload,omitempty" yaml:"payload,omitempty"`
CorrelationID *BreakingChangeRule `json:"correlationId,omitempty" yaml:"correlationId,omitempty"`
ContentType *BreakingChangeRule `json:"contentType,omitempty" yaml:"contentType,omitempty"`
Name *BreakingChangeRule `json:"name,omitempty" yaml:"name,omitempty"`
Title *BreakingChangeRule `json:"title,omitempty" yaml:"title,omitempty"`
Summary *BreakingChangeRule `json:"summary,omitempty" yaml:"summary,omitempty"`
Description *BreakingChangeRule `json:"description,omitempty" yaml:"description,omitempty"`
Tags *BreakingChangeRule `json:"tags,omitempty" yaml:"tags,omitempty"`
ExternalDocs *BreakingChangeRule `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
Bindings *BreakingChangeRule `json:"bindings,omitempty" yaml:"bindings,omitempty"`
Examples *BreakingChangeRule `json:"examples,omitempty" yaml:"examples,omitempty"`
Traits *BreakingChangeRule `json:"traits,omitempty" yaml:"traits,omitempty"`
}
MessageRules defines breaking rules for the Message object properties.
type MessageTraitChanges ¶
type MessageTraitChanges struct {
*PropertyChanges
HeadersChanges *wcmodel.SchemaChanges `json:"headers,omitempty" yaml:"headers,omitempty"`
CorrelationIDChanges *CorrelationIDChanges `json:"correlationId,omitempty" yaml:"correlationId,omitempty"`
TagChanges map[string]*TagChanges `json:"tags,omitempty" yaml:"tags,omitempty"`
ExternalDocChanges *ExternalDocChanges `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
BindingsChanges *MessageBindingsChanges `json:"bindings,omitempty" yaml:"bindings,omitempty"`
ExampleChanges map[string]*MessageExampleChanges `json:"examples,omitempty" yaml:"examples,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
MessageTraitChanges represents changes made to an AsyncAPI Message Trait object.
func CompareMessageTraits ¶
func CompareMessageTraits(l, r *lowasync.MessageTrait, configs ...*BreakingRulesConfig) *MessageTraitChanges
CompareMessageTraits compares two AsyncAPI Message Trait objects and returns a pointer to MessageTraitChanges, or nil if nothing changed.
The headers field is a schema, so its comparison is delegated to libopenapi's what-changed schema comparator. Examples are keyed by name; unnamed examples fall back to hash identity, so an edited unnamed example reports as one removal plus one addition.
func (*MessageTraitChanges) GetAllChanges ¶
func (m *MessageTraitChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between Message Trait objects.
func (*MessageTraitChanges) TotalBreakingChanges ¶
func (m *MessageTraitChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*MessageTraitChanges) TotalChanges ¶
func (m *MessageTraitChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type MessageTraitRules ¶
type MessageTraitRules struct {
Headers *BreakingChangeRule `json:"headers,omitempty" yaml:"headers,omitempty"`
CorrelationID *BreakingChangeRule `json:"correlationId,omitempty" yaml:"correlationId,omitempty"`
ContentType *BreakingChangeRule `json:"contentType,omitempty" yaml:"contentType,omitempty"`
Name *BreakingChangeRule `json:"name,omitempty" yaml:"name,omitempty"`
Title *BreakingChangeRule `json:"title,omitempty" yaml:"title,omitempty"`
Summary *BreakingChangeRule `json:"summary,omitempty" yaml:"summary,omitempty"`
Description *BreakingChangeRule `json:"description,omitempty" yaml:"description,omitempty"`
Tags *BreakingChangeRule `json:"tags,omitempty" yaml:"tags,omitempty"`
ExternalDocs *BreakingChangeRule `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
Bindings *BreakingChangeRule `json:"bindings,omitempty" yaml:"bindings,omitempty"`
Examples *BreakingChangeRule `json:"examples,omitempty" yaml:"examples,omitempty"`
}
MessageTraitRules defines breaking rules for the Message Trait object properties.
type OAuthFlowChanges ¶
type OAuthFlowChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
OAuthFlowChanges represents changes made to an AsyncAPI OAuth Flow object.
func CompareOAuthFlow ¶
func CompareOAuthFlow(l, r *lowasync.OAuthFlow, configs ...*BreakingRulesConfig) *OAuthFlowChanges
CompareOAuthFlow compares two AsyncAPI OAuth Flow objects and returns a pointer to OAuthFlowChanges, or nil if nothing changed.
Available scopes are compared key-by-key: removed scopes, added scopes and modified scope descriptions are each recorded as individual changes.
func (*OAuthFlowChanges) GetAllChanges ¶
func (o *OAuthFlowChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between OAuth Flow objects.
func (*OAuthFlowChanges) TotalBreakingChanges ¶
func (o *OAuthFlowChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*OAuthFlowChanges) TotalChanges ¶
func (o *OAuthFlowChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type OAuthFlowRules ¶
type OAuthFlowRules struct {
AuthorizationURL *BreakingChangeRule `json:"authorizationUrl,omitempty" yaml:"authorizationUrl,omitempty"`
TokenURL *BreakingChangeRule `json:"tokenUrl,omitempty" yaml:"tokenUrl,omitempty"`
RefreshURL *BreakingChangeRule `json:"refreshUrl,omitempty" yaml:"refreshUrl,omitempty"`
AvailableScopes *BreakingChangeRule `json:"availableScopes,omitempty" yaml:"availableScopes,omitempty"`
}
OAuthFlowRules defines breaking rules for the OAuth Flow object properties.
type OAuthFlowsChanges ¶
type OAuthFlowsChanges struct {
*PropertyChanges
ImplicitChanges *OAuthFlowChanges `json:"implicit,omitempty" yaml:"implicit,omitempty"`
PasswordChanges *OAuthFlowChanges `json:"password,omitempty" yaml:"password,omitempty"`
ClientCredentialsChanges *OAuthFlowChanges `json:"clientCredentials,omitempty" yaml:"clientCredentials,omitempty"`
AuthorizationCodeChanges *OAuthFlowChanges `json:"authorizationCode,omitempty" yaml:"authorizationCode,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
OAuthFlowsChanges represents changes made to an AsyncAPI OAuth Flows object.
func CompareOAuthFlows ¶
func CompareOAuthFlows(l, r *lowasync.OAuthFlows, configs ...*BreakingRulesConfig) *OAuthFlowsChanges
CompareOAuthFlows compares two AsyncAPI OAuth Flows objects and returns a pointer to OAuthFlowsChanges, or nil if nothing changed.
func (*OAuthFlowsChanges) GetAllChanges ¶
func (o *OAuthFlowsChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between OAuth Flows objects.
func (*OAuthFlowsChanges) TotalBreakingChanges ¶
func (o *OAuthFlowsChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*OAuthFlowsChanges) TotalChanges ¶
func (o *OAuthFlowsChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type OAuthFlowsRules ¶
type OAuthFlowsRules struct {
Implicit *BreakingChangeRule `json:"implicit,omitempty" yaml:"implicit,omitempty"`
Password *BreakingChangeRule `json:"password,omitempty" yaml:"password,omitempty"`
ClientCredentials *BreakingChangeRule `json:"clientCredentials,omitempty" yaml:"clientCredentials,omitempty"`
AuthorizationCode *BreakingChangeRule `json:"authorizationCode,omitempty" yaml:"authorizationCode,omitempty"`
}
OAuthFlowsRules defines breaking rules for the OAuth Flows object properties.
type OperationBindingsChanges ¶
type OperationBindingsChanges struct {
*PropertyChanges
HTTPChanges *HTTPOperationBindingChanges `json:"http,omitempty" yaml:"http,omitempty"`
KafkaChanges *KafkaOperationBindingChanges `json:"kafka,omitempty" yaml:"kafka,omitempty"`
AMQPChanges *AMQPOperationBindingChanges `json:"amqp,omitempty" yaml:"amqp,omitempty"`
MQTTChanges *MQTTOperationBindingChanges `json:"mqtt,omitempty" yaml:"mqtt,omitempty"`
SQSChanges *SQSOperationBindingChanges `json:"sqs,omitempty" yaml:"sqs,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
OperationBindingsChanges represents changes made to an AsyncAPI OperationBindings object.
func CompareOperationBindings ¶
func CompareOperationBindings(l, r *lowasync.OperationBindings, configs ...*BreakingRulesConfig) *OperationBindingsChanges
CompareOperationBindings compares two AsyncAPI OperationBindings objects and returns a pointer to OperationBindingsChanges, or nil if nothing changed.
func (*OperationBindingsChanges) GetAllChanges ¶
func (o *OperationBindingsChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between OperationBindings objects.
func (*OperationBindingsChanges) TotalBreakingChanges ¶
func (o *OperationBindingsChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*OperationBindingsChanges) TotalChanges ¶
func (o *OperationBindingsChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type OperationBindingsRules ¶
type OperationBindingsRules struct {
HTTP *BreakingChangeRule `json:"http,omitempty" yaml:"http,omitempty"`
Kafka *BreakingChangeRule `json:"kafka,omitempty" yaml:"kafka,omitempty"`
AMQP *BreakingChangeRule `json:"amqp,omitempty" yaml:"amqp,omitempty"`
MQTT *BreakingChangeRule `json:"mqtt,omitempty" yaml:"mqtt,omitempty"`
SQS *BreakingChangeRule `json:"sqs,omitempty" yaml:"sqs,omitempty"`
}
OperationBindingsRules defines breaking rules for the Operation Bindings container properties.
type OperationChanges ¶
type OperationChanges struct {
*PropertyChanges
TagChanges map[string]*TagChanges `json:"tags,omitempty" yaml:"tags,omitempty"`
ExternalDocChanges *ExternalDocChanges `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
BindingsChanges *OperationBindingsChanges `json:"bindings,omitempty" yaml:"bindings,omitempty"`
ReplyChanges *OperationReplyChanges `json:"reply,omitempty" yaml:"reply,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
OperationChanges represents changes made to a single AsyncAPI Operation object.
func CompareOperations ¶
func CompareOperations(l, r *lowasync.Operation, configs ...*BreakingRulesConfig) *OperationChanges
CompareOperations compares two AsyncAPI Operation objects and returns a pointer to OperationChanges, or nil if nothing changed.
The operation channel and messages are reference-only fields and are compared as reference strings, never recursed into. Traits have no natural identity key so they are compared as hashed sets; an in-place trait edit reports as one removal and one addition.
func (*OperationChanges) GetAllChanges ¶
func (o *OperationChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between Operation objects.
func (*OperationChanges) TotalBreakingChanges ¶
func (o *OperationChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*OperationChanges) TotalChanges ¶
func (o *OperationChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type OperationReplyAddressChanges ¶
type OperationReplyAddressChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
OperationReplyAddressChanges represents changes made to a single AsyncAPI OperationReplyAddress object.
func CompareOperationReplyAddress ¶
func CompareOperationReplyAddress(l, r *lowasync.OperationReplyAddress, configs ...*BreakingRulesConfig) *OperationReplyAddressChanges
CompareOperationReplyAddress compares two AsyncAPI OperationReplyAddress objects and returns a pointer to OperationReplyAddressChanges, or nil if nothing changed.
func (*OperationReplyAddressChanges) GetAllChanges ¶
func (ora *OperationReplyAddressChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between OperationReplyAddress objects.
func (*OperationReplyAddressChanges) TotalBreakingChanges ¶
func (ora *OperationReplyAddressChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*OperationReplyAddressChanges) TotalChanges ¶
func (ora *OperationReplyAddressChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type OperationReplyAddressRules ¶
type OperationReplyAddressRules struct {
Description *BreakingChangeRule `json:"description,omitempty" yaml:"description,omitempty"`
Location *BreakingChangeRule `json:"location,omitempty" yaml:"location,omitempty"`
}
OperationReplyAddressRules defines breaking rules for the Operation Reply Address object properties.
type OperationReplyChanges ¶
type OperationReplyChanges struct {
*PropertyChanges
AddressChanges *OperationReplyAddressChanges `json:"address,omitempty" yaml:"address,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
OperationReplyChanges represents changes made to a single AsyncAPI OperationReply object.
func CompareOperationReply ¶
func CompareOperationReply(l, r *lowasync.OperationReply, configs ...*BreakingRulesConfig) *OperationReplyChanges
CompareOperationReply compares two AsyncAPI OperationReply objects and returns a pointer to OperationReplyChanges, or nil if nothing changed.
The reply channel and messages are reference-only fields and are compared as reference strings, never recursed into.
func (*OperationReplyChanges) GetAllChanges ¶
func (or *OperationReplyChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between OperationReply objects.
func (*OperationReplyChanges) TotalBreakingChanges ¶
func (or *OperationReplyChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*OperationReplyChanges) TotalChanges ¶
func (or *OperationReplyChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type OperationReplyRules ¶
type OperationReplyRules struct {
Address *BreakingChangeRule `json:"address,omitempty" yaml:"address,omitempty"`
Channel *BreakingChangeRule `json:"channel,omitempty" yaml:"channel,omitempty"`
Messages *BreakingChangeRule `json:"messages,omitempty" yaml:"messages,omitempty"`
}
OperationReplyRules defines breaking rules for the Operation Reply object properties.
type OperationRules ¶
type OperationRules struct {
Action *BreakingChangeRule `json:"action,omitempty" yaml:"action,omitempty"`
Channel *BreakingChangeRule `json:"channel,omitempty" yaml:"channel,omitempty"`
Title *BreakingChangeRule `json:"title,omitempty" yaml:"title,omitempty"`
Summary *BreakingChangeRule `json:"summary,omitempty" yaml:"summary,omitempty"`
Description *BreakingChangeRule `json:"description,omitempty" yaml:"description,omitempty"`
Security *BreakingChangeRule `json:"security,omitempty" yaml:"security,omitempty"`
Tags *BreakingChangeRule `json:"tags,omitempty" yaml:"tags,omitempty"`
ExternalDocs *BreakingChangeRule `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
Bindings *BreakingChangeRule `json:"bindings,omitempty" yaml:"bindings,omitempty"`
Traits *BreakingChangeRule `json:"traits,omitempty" yaml:"traits,omitempty"`
Messages *BreakingChangeRule `json:"messages,omitempty" yaml:"messages,omitempty"`
Reply *BreakingChangeRule `json:"reply,omitempty" yaml:"reply,omitempty"`
}
OperationRules defines breaking rules for the Operation object properties.
type OperationTraitChanges ¶
type OperationTraitChanges struct {
*PropertyChanges
TagChanges map[string]*TagChanges `json:"tags,omitempty" yaml:"tags,omitempty"`
ExternalDocChanges *ExternalDocChanges `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
BindingsChanges *OperationBindingsChanges `json:"bindings,omitempty" yaml:"bindings,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
OperationTraitChanges represents changes made to a single AsyncAPI OperationTrait object.
func CompareOperationTraits ¶
func CompareOperationTraits(l, r *lowasync.OperationTrait, configs ...*BreakingRulesConfig) *OperationTraitChanges
CompareOperationTraits compares two AsyncAPI OperationTrait objects and returns a pointer to OperationTraitChanges, or nil if nothing changed.
func (*OperationTraitChanges) GetAllChanges ¶
func (ot *OperationTraitChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between OperationTrait objects.
func (*OperationTraitChanges) TotalBreakingChanges ¶
func (ot *OperationTraitChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*OperationTraitChanges) TotalChanges ¶
func (ot *OperationTraitChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type OperationTraitRules ¶
type OperationTraitRules struct {
Title *BreakingChangeRule `json:"title,omitempty" yaml:"title,omitempty"`
Summary *BreakingChangeRule `json:"summary,omitempty" yaml:"summary,omitempty"`
Description *BreakingChangeRule `json:"description,omitempty" yaml:"description,omitempty"`
Security *BreakingChangeRule `json:"security,omitempty" yaml:"security,omitempty"`
Tags *BreakingChangeRule `json:"tags,omitempty" yaml:"tags,omitempty"`
ExternalDocs *BreakingChangeRule `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
Bindings *BreakingChangeRule `json:"bindings,omitempty" yaml:"bindings,omitempty"`
}
OperationTraitRules defines breaking rules for the Operation Trait object properties.
type ParameterChanges ¶
type ParameterChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
ParameterChanges represents changes made to a single AsyncAPI Parameter object.
func CompareParameters ¶
func CompareParameters(l, r *lowasync.Parameter, configs ...*BreakingRulesConfig) *ParameterChanges
CompareParameters compares two AsyncAPI Parameter objects and returns a pointer to ParameterChanges, or nil if nothing changed.
func (*ParameterChanges) GetAllChanges ¶
func (p *ParameterChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between Parameter objects.
func (*ParameterChanges) TotalBreakingChanges ¶
func (p *ParameterChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*ParameterChanges) TotalChanges ¶
func (p *ParameterChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type ParameterRules ¶
type ParameterRules struct {
Enum *BreakingChangeRule `json:"enum,omitempty" yaml:"enum,omitempty"`
Default *BreakingChangeRule `json:"default,omitempty" yaml:"default,omitempty"`
Description *BreakingChangeRule `json:"description,omitempty" yaml:"description,omitempty"`
Examples *BreakingChangeRule `json:"examples,omitempty" yaml:"examples,omitempty"`
Location *BreakingChangeRule `json:"location,omitempty" yaml:"location,omitempty"`
}
ParameterRules defines breaking rules for the channel Parameter object properties.
type PropertyChanges ¶
type PropertyChanges = wcmodel.PropertyChanges
PropertyChanges holds a slice of Change pointers.
type PropertyCheck ¶
type PropertyCheck = wcmodel.PropertyCheck
PropertyCheck is used by checking mechanisms to define a property to be checked.
func NewPropertyCheck ¶
func NewPropertyCheck(component, property string, leftNode, rightNode *yaml.Node, label string, changes *[]*Change, original, updated any, configs ...*BreakingRulesConfig, ) *PropertyCheck
NewPropertyCheck creates a new PropertyCheck for the given component and property, resolving breaking status from this package's active AsyncAPI breaking-rules config.
type SQSChannelBindingChanges ¶
type SQSChannelBindingChanges struct {
*PropertyChanges
QueueChanges *SQSQueueChanges `json:"queue,omitempty" yaml:"queue,omitempty"`
DeadLetterQueueChanges *SQSQueueChanges `json:"deadLetterQueue,omitempty" yaml:"deadLetterQueue,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
SQSChannelBindingChanges represents changes made to an AsyncAPI SQS Channel Binding object.
func CompareSQSChannelBinding ¶
func CompareSQSChannelBinding(l, r *lowasync.SQSChannelBinding, configs ...*BreakingRulesConfig) *SQSChannelBindingChanges
CompareSQSChannelBinding compares two AsyncAPI SQS Channel Binding objects and returns a pointer to SQSChannelBindingChanges, or nil if nothing changed.
func (*SQSChannelBindingChanges) GetAllChanges ¶
func (s *SQSChannelBindingChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between SQS Channel Binding objects.
func (*SQSChannelBindingChanges) TotalBreakingChanges ¶
func (s *SQSChannelBindingChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*SQSChannelBindingChanges) TotalChanges ¶
func (s *SQSChannelBindingChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type SQSChannelBindingRules ¶
type SQSChannelBindingRules struct {
Queue *BreakingChangeRule `json:"queue,omitempty" yaml:"queue,omitempty"`
DeadLetterQueue *BreakingChangeRule `json:"deadLetterQueue,omitempty" yaml:"deadLetterQueue,omitempty"`
BindingVersion *BreakingChangeRule `json:"bindingVersion,omitempty" yaml:"bindingVersion,omitempty"`
}
SQSChannelBindingRules defines breaking rules for the SQS Channel Binding properties.
type SQSIdentifierChanges ¶
type SQSIdentifierChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
SQSIdentifierChanges represents changes made to an AsyncAPI SQS Identifier object.
func CompareSQSIdentifier ¶
func CompareSQSIdentifier(l, r *lowasync.SQSIdentifier, configs ...*BreakingRulesConfig) *SQSIdentifierChanges
CompareSQSIdentifier compares two AsyncAPI SQS Identifier objects and returns a pointer to SQSIdentifierChanges, or nil if nothing changed.
func (*SQSIdentifierChanges) GetAllChanges ¶
func (s *SQSIdentifierChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between SQS Identifier objects.
func (*SQSIdentifierChanges) TotalBreakingChanges ¶
func (s *SQSIdentifierChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*SQSIdentifierChanges) TotalChanges ¶
func (s *SQSIdentifierChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type SQSIdentifierRules ¶
type SQSIdentifierRules struct {
Name *BreakingChangeRule `json:"name,omitempty" yaml:"name,omitempty"`
ARN *BreakingChangeRule `json:"arn,omitempty" yaml:"arn,omitempty"`
FifoQueue *BreakingChangeRule `json:"fifoQueue,omitempty" yaml:"fifoQueue,omitempty"`
}
SQSIdentifierRules defines breaking rules for the SQS Identifier properties.
type SQSMessageBindingChanges ¶
type SQSMessageBindingChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
SQSMessageBindingChanges represents changes made to an AsyncAPI SQS Message Binding object.
func CompareSQSMessageBinding ¶
func CompareSQSMessageBinding(l, r *lowasync.SQSMessageBinding, configs ...*BreakingRulesConfig) *SQSMessageBindingChanges
CompareSQSMessageBinding compares two AsyncAPI SQS Message Binding objects and returns a pointer to SQSMessageBindingChanges, or nil if nothing changed. The binding carries no fields beyond extensions.
func (*SQSMessageBindingChanges) GetAllChanges ¶
func (s *SQSMessageBindingChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between SQS Message Binding objects.
func (*SQSMessageBindingChanges) TotalBreakingChanges ¶
func (s *SQSMessageBindingChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*SQSMessageBindingChanges) TotalChanges ¶
func (s *SQSMessageBindingChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type SQSOperationBindingChanges ¶
type SQSOperationBindingChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
SQSOperationBindingChanges represents changes made to an AsyncAPI SQS Operation Binding object.
func CompareSQSOperationBinding ¶
func CompareSQSOperationBinding(l, r *lowasync.SQSOperationBinding, configs ...*BreakingRulesConfig) *SQSOperationBindingChanges
CompareSQSOperationBinding compares two AsyncAPI SQS Operation Binding objects and returns a pointer to SQSOperationBindingChanges, or nil if nothing changed.
Queues have no natural identity key, so they are compared by hash; an in-place edit reports as one removal plus one addition.
func (*SQSOperationBindingChanges) GetAllChanges ¶
func (s *SQSOperationBindingChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between SQS Operation Binding objects.
func (*SQSOperationBindingChanges) TotalBreakingChanges ¶
func (s *SQSOperationBindingChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*SQSOperationBindingChanges) TotalChanges ¶
func (s *SQSOperationBindingChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type SQSOperationBindingRules ¶
type SQSOperationBindingRules struct {
Queues *BreakingChangeRule `json:"queues,omitempty" yaml:"queues,omitempty"`
BindingVersion *BreakingChangeRule `json:"bindingVersion,omitempty" yaml:"bindingVersion,omitempty"`
}
SQSOperationBindingRules defines breaking rules for the SQS Operation Binding properties.
type SQSPolicyChanges ¶
type SQSPolicyChanges struct {
*PropertyChanges
StatementChanges []*SQSPolicyStatementChanges `json:"statements,omitempty" yaml:"statements,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
SQSPolicyChanges represents changes made to an AsyncAPI SQS Policy object.
func CompareSQSPolicy ¶
func CompareSQSPolicy(l, r *lowasync.SQSPolicy, configs ...*BreakingRulesConfig) *SQSPolicyChanges
CompareSQSPolicy compares two AsyncAPI SQS Policy objects and returns a pointer to SQSPolicyChanges, or nil if nothing changed.
Statements are an ordered list without a natural identity key, so entries are paired positionally: statements sharing an index are compared field by field, and surplus entries on either side are reported as additions or removals.
func (*SQSPolicyChanges) GetAllChanges ¶
func (s *SQSPolicyChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between SQS Policy objects.
func (*SQSPolicyChanges) TotalBreakingChanges ¶
func (s *SQSPolicyChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*SQSPolicyChanges) TotalChanges ¶
func (s *SQSPolicyChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type SQSPolicyRules ¶
type SQSPolicyRules struct {
Statements *BreakingChangeRule `json:"statements,omitempty" yaml:"statements,omitempty"`
}
SQSPolicyRules defines breaking rules for the SQS Policy properties.
type SQSPolicyStatementChanges ¶
type SQSPolicyStatementChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
SQSPolicyStatementChanges represents changes made to an AsyncAPI SQS Policy Statement object.
func CompareSQSPolicyStatement ¶
func CompareSQSPolicyStatement(l, r *lowasync.SQSPolicyStatement, configs ...*BreakingRulesConfig) *SQSPolicyStatementChanges
CompareSQSPolicyStatement compares two AsyncAPI SQS Policy Statement objects and returns a pointer to SQSPolicyStatementChanges, or nil if nothing changed.
Principal, action, resource and condition are free-form IAM values, so they are compared structurally as raw yaml nodes.
func (*SQSPolicyStatementChanges) GetAllChanges ¶
func (s *SQSPolicyStatementChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between SQS Policy Statement objects.
func (*SQSPolicyStatementChanges) TotalBreakingChanges ¶
func (s *SQSPolicyStatementChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*SQSPolicyStatementChanges) TotalChanges ¶
func (s *SQSPolicyStatementChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type SQSPolicyStatementRules ¶
type SQSPolicyStatementRules struct {
Effect *BreakingChangeRule `json:"effect,omitempty" yaml:"effect,omitempty"`
Principal *BreakingChangeRule `json:"principal,omitempty" yaml:"principal,omitempty"`
Action *BreakingChangeRule `json:"action,omitempty" yaml:"action,omitempty"`
Resource *BreakingChangeRule `json:"resource,omitempty" yaml:"resource,omitempty"`
Condition *BreakingChangeRule `json:"condition,omitempty" yaml:"condition,omitempty"`
}
SQSPolicyStatementRules defines breaking rules for the SQS Policy Statement properties.
type SQSQueueChanges ¶
type SQSQueueChanges struct {
*PropertyChanges
RedrivePolicyChanges *SQSRedrivePolicyChanges `json:"redrivePolicy,omitempty" yaml:"redrivePolicy,omitempty"`
PolicyChanges *SQSPolicyChanges `json:"policy,omitempty" yaml:"policy,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
SQSQueueChanges represents changes made to an AsyncAPI SQS Queue object.
func CompareSQSQueue ¶
func CompareSQSQueue(l, r *lowasync.SQSQueue, configs ...*BreakingRulesConfig) *SQSQueueChanges
CompareSQSQueue compares two AsyncAPI SQS Queue objects and returns a pointer to SQSQueueChanges, or nil if nothing changed.
Tags are a free-form map, so they are compared structurally as a raw yaml node.
func (*SQSQueueChanges) GetAllChanges ¶
func (s *SQSQueueChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between SQS Queue objects.
func (*SQSQueueChanges) TotalBreakingChanges ¶
func (s *SQSQueueChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*SQSQueueChanges) TotalChanges ¶
func (s *SQSQueueChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type SQSQueueRules ¶
type SQSQueueRules struct {
Name *BreakingChangeRule `json:"name,omitempty" yaml:"name,omitempty"`
ARN *BreakingChangeRule `json:"arn,omitempty" yaml:"arn,omitempty"`
FifoQueue *BreakingChangeRule `json:"fifoQueue,omitempty" yaml:"fifoQueue,omitempty"`
DeduplicationScope *BreakingChangeRule `json:"deduplicationScope,omitempty" yaml:"deduplicationScope,omitempty"`
FifoThroughputLimit *BreakingChangeRule `json:"fifoThroughputLimit,omitempty" yaml:"fifoThroughputLimit,omitempty"`
DeliveryDelay *BreakingChangeRule `json:"deliveryDelay,omitempty" yaml:"deliveryDelay,omitempty"`
VisibilityTimeout *BreakingChangeRule `json:"visibilityTimeout,omitempty" yaml:"visibilityTimeout,omitempty"`
ReceiveMessageWaitTime *BreakingChangeRule `json:"receiveMessageWaitTime,omitempty" yaml:"receiveMessageWaitTime,omitempty"`
MessageRetentionPeriod *BreakingChangeRule `json:"messageRetentionPeriod,omitempty" yaml:"messageRetentionPeriod,omitempty"`
RedrivePolicy *BreakingChangeRule `json:"redrivePolicy,omitempty" yaml:"redrivePolicy,omitempty"`
Policy *BreakingChangeRule `json:"policy,omitempty" yaml:"policy,omitempty"`
Tags *BreakingChangeRule `json:"tags,omitempty" yaml:"tags,omitempty"`
}
SQSQueueRules defines breaking rules for the SQS Queue properties.
type SQSRedrivePolicyChanges ¶
type SQSRedrivePolicyChanges struct {
*PropertyChanges
DeadLetterQueueChanges *SQSIdentifierChanges `json:"deadLetterQueue,omitempty" yaml:"deadLetterQueue,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
SQSRedrivePolicyChanges represents changes made to an AsyncAPI SQS Redrive Policy object.
func CompareSQSRedrivePolicy ¶
func CompareSQSRedrivePolicy(l, r *lowasync.SQSRedrivePolicy, configs ...*BreakingRulesConfig) *SQSRedrivePolicyChanges
CompareSQSRedrivePolicy compares two AsyncAPI SQS Redrive Policy objects and returns a pointer to SQSRedrivePolicyChanges, or nil if nothing changed.
func (*SQSRedrivePolicyChanges) GetAllChanges ¶
func (s *SQSRedrivePolicyChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between SQS Redrive Policy objects.
func (*SQSRedrivePolicyChanges) TotalBreakingChanges ¶
func (s *SQSRedrivePolicyChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*SQSRedrivePolicyChanges) TotalChanges ¶
func (s *SQSRedrivePolicyChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type SQSRedrivePolicyRules ¶
type SQSRedrivePolicyRules struct {
DeadLetterQueue *BreakingChangeRule `json:"deadLetterQueue,omitempty" yaml:"deadLetterQueue,omitempty"`
MaxReceiveCount *BreakingChangeRule `json:"maxReceiveCount,omitempty" yaml:"maxReceiveCount,omitempty"`
}
SQSRedrivePolicyRules defines breaking rules for the SQS Redrive Policy properties.
type SQSServerBindingChanges ¶
type SQSServerBindingChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
SQSServerBindingChanges represents changes made to an AsyncAPI SQS Server Binding object.
func CompareSQSServerBinding ¶
func CompareSQSServerBinding(l, r *lowasync.SQSServerBinding, configs ...*BreakingRulesConfig) *SQSServerBindingChanges
CompareSQSServerBinding compares two AsyncAPI SQS Server Binding objects and returns a pointer to SQSServerBindingChanges, or nil if nothing changed. The binding carries no fields beyond extensions.
func (*SQSServerBindingChanges) GetAllChanges ¶
func (s *SQSServerBindingChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between SQS Server Binding objects.
func (*SQSServerBindingChanges) TotalBreakingChanges ¶
func (s *SQSServerBindingChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*SQSServerBindingChanges) TotalChanges ¶
func (s *SQSServerBindingChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type SecuritySchemeChanges ¶
type SecuritySchemeChanges struct {
*PropertyChanges
FlowsChanges *OAuthFlowsChanges `json:"flows,omitempty" yaml:"flows,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
SecuritySchemeChanges represents changes made to an AsyncAPI Security Scheme object.
func CompareSecuritySchemes ¶
func CompareSecuritySchemes(l, r *lowasync.SecurityScheme, configs ...*BreakingRulesConfig) *SecuritySchemeChanges
CompareSecuritySchemes compares two AsyncAPI Security Scheme objects and returns a pointer to SecuritySchemeChanges, or nil if nothing changed.
Scopes is the AsyncAPI specific array-of-strings field, compared as a set; the OAuth flow scope maps are handled by CompareOAuthFlow.
func (*SecuritySchemeChanges) GetAllChanges ¶
func (s *SecuritySchemeChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between Security Scheme objects.
func (*SecuritySchemeChanges) TotalBreakingChanges ¶
func (s *SecuritySchemeChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*SecuritySchemeChanges) TotalChanges ¶
func (s *SecuritySchemeChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type SecuritySchemeRules ¶
type SecuritySchemeRules struct {
Type *BreakingChangeRule `json:"type,omitempty" yaml:"type,omitempty"`
Description *BreakingChangeRule `json:"description,omitempty" yaml:"description,omitempty"`
Name *BreakingChangeRule `json:"name,omitempty" yaml:"name,omitempty"`
In *BreakingChangeRule `json:"in,omitempty" yaml:"in,omitempty"`
Scheme *BreakingChangeRule `json:"scheme,omitempty" yaml:"scheme,omitempty"`
BearerFormat *BreakingChangeRule `json:"bearerFormat,omitempty" yaml:"bearerFormat,omitempty"`
Flows *BreakingChangeRule `json:"flows,omitempty" yaml:"flows,omitempty"`
OpenIDConnectURL *BreakingChangeRule `json:"openIdConnectUrl,omitempty" yaml:"openIdConnectUrl,omitempty"`
Scopes *BreakingChangeRule `json:"scopes,omitempty" yaml:"scopes,omitempty"`
}
SecuritySchemeRules defines breaking rules for the Security Scheme object properties.
type ServerBindingsChanges ¶
type ServerBindingsChanges struct {
*PropertyChanges
HTTPChanges *HTTPServerBindingChanges `json:"http,omitempty" yaml:"http,omitempty"`
KafkaChanges *KafkaServerBindingChanges `json:"kafka,omitempty" yaml:"kafka,omitempty"`
MQTTChanges *MQTTServerBindingChanges `json:"mqtt,omitempty" yaml:"mqtt,omitempty"`
SQSChanges *SQSServerBindingChanges `json:"sqs,omitempty" yaml:"sqs,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
ServerBindingsChanges represents changes made to an AsyncAPI ServerBindings object.
func CompareServerBindings ¶
func CompareServerBindings(l, r *lowasync.ServerBindings, configs ...*BreakingRulesConfig) *ServerBindingsChanges
CompareServerBindings compares two AsyncAPI ServerBindings objects and returns a pointer to ServerBindingsChanges, or nil if nothing changed.
func (*ServerBindingsChanges) GetAllChanges ¶
func (s *ServerBindingsChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between ServerBindings objects.
func (*ServerBindingsChanges) TotalBreakingChanges ¶
func (s *ServerBindingsChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*ServerBindingsChanges) TotalChanges ¶
func (s *ServerBindingsChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type ServerBindingsRules ¶
type ServerBindingsRules struct {
HTTP *BreakingChangeRule `json:"http,omitempty" yaml:"http,omitempty"`
Kafka *BreakingChangeRule `json:"kafka,omitempty" yaml:"kafka,omitempty"`
MQTT *BreakingChangeRule `json:"mqtt,omitempty" yaml:"mqtt,omitempty"`
SQS *BreakingChangeRule `json:"sqs,omitempty" yaml:"sqs,omitempty"`
}
ServerBindingsRules defines breaking rules for the Server Bindings container properties.
type ServerChanges ¶
type ServerChanges struct {
*PropertyChanges
ServerVariableChanges map[string]*ServerVariableChanges `json:"variables,omitempty" yaml:"variables,omitempty"`
TagChanges map[string]*TagChanges `json:"tags,omitempty" yaml:"tags,omitempty"`
ExternalDocChanges *ExternalDocChanges `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
BindingsChanges *ServerBindingsChanges `json:"bindings,omitempty" yaml:"bindings,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
ServerChanges represents changes made to a single AsyncAPI Server object.
func CompareServers ¶
func CompareServers(l, r *lowasync.Server, configs ...*BreakingRulesConfig) *ServerChanges
CompareServers compares two AsyncAPI Server objects and returns a pointer to ServerChanges, or nil if nothing changed.
func (*ServerChanges) GetAllChanges ¶
func (s *ServerChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between Server objects.
func (*ServerChanges) TotalBreakingChanges ¶
func (s *ServerChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*ServerChanges) TotalChanges ¶
func (s *ServerChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type ServerRules ¶
type ServerRules struct {
Host *BreakingChangeRule `json:"host,omitempty" yaml:"host,omitempty"`
Protocol *BreakingChangeRule `json:"protocol,omitempty" yaml:"protocol,omitempty"`
ProtocolVersion *BreakingChangeRule `json:"protocolVersion,omitempty" yaml:"protocolVersion,omitempty"`
Pathname *BreakingChangeRule `json:"pathname,omitempty" yaml:"pathname,omitempty"`
Title *BreakingChangeRule `json:"title,omitempty" yaml:"title,omitempty"`
Summary *BreakingChangeRule `json:"summary,omitempty" yaml:"summary,omitempty"`
Description *BreakingChangeRule `json:"description,omitempty" yaml:"description,omitempty"`
Variables *BreakingChangeRule `json:"variables,omitempty" yaml:"variables,omitempty"`
Security *BreakingChangeRule `json:"security,omitempty" yaml:"security,omitempty"`
Tags *BreakingChangeRule `json:"tags,omitempty" yaml:"tags,omitempty"`
ExternalDocs *BreakingChangeRule `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
Bindings *BreakingChangeRule `json:"bindings,omitempty" yaml:"bindings,omitempty"`
}
ServerRules defines breaking rules for the Server object properties.
type ServerVariableChanges ¶
type ServerVariableChanges struct {
*PropertyChanges
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
ServerVariableChanges represents changes made to a single AsyncAPI ServerVariable object.
func CompareServerVariables ¶
func CompareServerVariables(l, r *lowasync.ServerVariable, configs ...*BreakingRulesConfig) *ServerVariableChanges
CompareServerVariables compares two AsyncAPI ServerVariable objects and returns a pointer to ServerVariableChanges, or nil if nothing changed.
func (*ServerVariableChanges) GetAllChanges ¶
func (sv *ServerVariableChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between ServerVariable objects.
func (*ServerVariableChanges) TotalBreakingChanges ¶
func (sv *ServerVariableChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*ServerVariableChanges) TotalChanges ¶
func (sv *ServerVariableChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type ServerVariableRules ¶
type ServerVariableRules struct {
Enum *BreakingChangeRule `json:"enum,omitempty" yaml:"enum,omitempty"`
Default *BreakingChangeRule `json:"default,omitempty" yaml:"default,omitempty"`
Description *BreakingChangeRule `json:"description,omitempty" yaml:"description,omitempty"`
Examples *BreakingChangeRule `json:"examples,omitempty" yaml:"examples,omitempty"`
}
ServerVariableRules defines breaking rules for the Server Variable object properties.
type TagChanges ¶
type TagChanges struct {
*PropertyChanges
ExternalDocChanges *ExternalDocChanges `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
TagChanges represents changes made to a single AsyncAPI Tag object.
func CompareTags ¶
func CompareTags(l, r *lowasync.Tag, configs ...*BreakingRulesConfig) *TagChanges
CompareTags compares two AsyncAPI Tag objects and returns a pointer to TagChanges, or nil if nothing changed.
func (*TagChanges) GetAllChanges ¶
func (t *TagChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between Tag objects.
func (*TagChanges) TotalBreakingChanges ¶
func (t *TagChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*TagChanges) TotalChanges ¶
func (t *TagChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type TagRules ¶
type TagRules struct {
Name *BreakingChangeRule `json:"name,omitempty" yaml:"name,omitempty"`
Description *BreakingChangeRule `json:"description,omitempty" yaml:"description,omitempty"`
ExternalDocs *BreakingChangeRule `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
}
TagRules defines breaking rules for the Tag object properties.
type WebSocketChannelBindingChanges ¶
type WebSocketChannelBindingChanges struct {
*PropertyChanges
QueryChanges *wcmodel.SchemaChanges `json:"query,omitempty" yaml:"query,omitempty"`
HeadersChanges *wcmodel.SchemaChanges `json:"headers,omitempty" yaml:"headers,omitempty"`
ExtensionChanges *ExtensionChanges `json:"extensions,omitempty" yaml:"extensions,omitempty"`
}
WebSocketChannelBindingChanges represents changes made to an AsyncAPI WebSocket Channel Binding object.
func CompareWebSocketChannelBinding ¶
func CompareWebSocketChannelBinding(l, r *lowasync.WebSocketChannelBinding, configs ...*BreakingRulesConfig) *WebSocketChannelBindingChanges
CompareWebSocketChannelBinding compares two AsyncAPI WebSocket Channel Binding objects and returns a pointer to WebSocketChannelBindingChanges, or nil if nothing changed.
The query and headers fields are schemas, so their comparison is delegated to libopenapi's what-changed schema comparator.
func (*WebSocketChannelBindingChanges) GetAllChanges ¶
func (w *WebSocketChannelBindingChanges) GetAllChanges() []*Change
GetAllChanges returns a slice of all changes made between WebSocket Channel Binding objects.
func (*WebSocketChannelBindingChanges) TotalBreakingChanges ¶
func (w *WebSocketChannelBindingChanges) TotalBreakingChanges() int
TotalBreakingChanges returns the number of breaking changes made.
func (*WebSocketChannelBindingChanges) TotalChanges ¶
func (w *WebSocketChannelBindingChanges) TotalChanges() int
TotalChanges returns a count of everything that changed.
type WebSocketChannelBindingRules ¶
type WebSocketChannelBindingRules struct {
Method *BreakingChangeRule `json:"method,omitempty" yaml:"method,omitempty"`
Query *BreakingChangeRule `json:"query,omitempty" yaml:"query,omitempty"`
Headers *BreakingChangeRule `json:"headers,omitempty" yaml:"headers,omitempty"`
BindingVersion *BreakingChangeRule `json:"bindingVersion,omitempty" yaml:"bindingVersion,omitempty"`
}
WebSocketChannelBindingRules defines breaking rules for the WebSocket Channel Binding properties.
Source Files
¶
- bindings.go
- breaking_rules.go
- breaking_rules_config.go
- breaking_rules_constants.go
- breaking_rules_model.go
- channel.go
- comparison_helpers.go
- components.go
- contact.go
- core.go
- correlation_id.go
- document.go
- external_docs.go
- info.go
- license.go
- message.go
- message_example.go
- operation.go
- security_scheme.go
- server.go
- server_variable.go
- tags.go