Skip to content

Commit

Permalink
Merge pull request #583 from twmb/sr-omitempty
Browse files Browse the repository at this point in the history
sr: make SetCompatibility fields optional
  • Loading branch information
twmb authored Sep 29, 2023
2 parents c9d2351 + 4039539 commit 4449480
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 4449480

Please sign in to comment.