Skip to content

Commit

Permalink
sr: make SetCompatibility fields optional
Browse files Browse the repository at this point in the history
  • Loading branch information
twmb committed Sep 29, 2023
1 parent c9d2351 commit 4039539
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions pkg/sr/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,10 +543,10 @@ type CompatibilityResult struct {
Alias string `json:"alias"` // The subject alias, if any.
Normalize bool `json:"normalize"` // Whether or not schemas are normalized by default.
Group string `json:"compatibilityGroup"` // The compatibility group, if any. Only schemas in the same group are checked for compatibility.
DefaultMetadata SchemaMetadata `json:"defaultMetadata"` // Default metadata used for schema registration.
OverrideMetadata SchemaMetadata `json:"overrideMetadata"` // Override metadata used for schema registration.
DefaultRuleSet SchemaRuleSet `json:"defaultRuleSet"` // Default rule set used for schema registration.
OverrideRuleSet SchemaRuleSet `json:"overrideRuleSet"` // Override rule set used for schema registration.
DefaultMetadata *SchemaMetadata `json:"defaultMetadata"` // Default metadata used for schema registration.
OverrideMetadata *SchemaMetadata `json:"overrideMetadata"` // Override metadata used for schema registration.
DefaultRuleSet *SchemaRuleSet `json:"defaultRuleSet"` // Default rule set used for schema registration.
OverrideRuleSet *SchemaRuleSet `json:"overrideRuleSet"` // Override rule set used for schema registration.

Err error `json:"-"` // The error received for getting this compatibility.
}
Expand Down Expand Up @@ -594,14 +594,14 @@ func (cl *Client) Compatibility(ctx context.Context, subjects ...string) []Compa
type SetCompatibility struct {
Subject string `json:"-"` // The subject this compatibility set is for, or empty for the global compatibility..

Level CompatibilityLevel `json:"compatibility"` // The subject (or global) compatibility level.
Alias string `json:"alias"` // The subject alias, if any.
Normalize bool `json:"normalize"` // Whether or not schemas are normalized by default.
Group string `json:"compatibilityGroup"` // The compatibility group, if any. Only schemas in the same group are checked for compatibility.
DefaultMetadata SchemaMetadata `json:"defaultMetadata"` // Default metadata used for schema registration.
OverrideMetadata SchemaMetadata `json:"overrideMetadata"` // Override metadata used for schema registration.
DefaultRuleSet SchemaRuleSet `json:"defaultRuleSet"` // Default rule set used for schema registration.
OverrideRuleSet SchemaRuleSet `json:"overrideRuleSet"` // Override rule set used for schema registration.
Level CompatibilityLevel `json:"compatibility"` // The subject (or global) compatibility level.
Alias string `json:"alias,omitempty"` // The subject alias, if any.
Normalize bool `json:"normalize,omitempty"` // Whether or not schemas are normalized by default.
Group string `json:"compatibilityGroup,omitempty"` // The compatibility group, if any. Only schemas in the same group are checked for compatibility.
DefaultMetadata *SchemaMetadata `json:"defaultMetadata,omitempty"` // Default metadata used for schema registration.
OverrideMetadata *SchemaMetadata `json:"overrideMetadata,omitempty"` // Override metadata used for schema registration.
DefaultRuleSet *SchemaRuleSet `json:"defaultRuleSet,omitempty"` // Default rule set used for schema registration.
OverrideRuleSet *SchemaRuleSet `json:"overrideRuleSet,omitempty"` // Override rule set used for schema registration.

Err error `json:"-"` // The error received for setting this compatibility.
}
Expand Down

0 comments on commit 4039539

Please sign in to comment.