Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sr: make SetCompatibility fields optional #583

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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