Skip to content

Commit

Permalink
fix: add omitempty to optional fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmed-Labs committed Feb 4, 2025
1 parent 6baa454 commit 7d00dad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/apis/eventing/v1beta3/eventtype_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ type EventTypeSpec struct {
Attributes []EventAttributeDefinition `json:"attributes"`
// Variables is an array that provides definitions for variables used within attribute values.
// +optional
Variables []EventVariableDefinition `json:"variables"`
Variables []EventVariableDefinition `json:"variables,omitempty"`
}

type EventAttributeDefinition struct {
Expand All @@ -93,9 +93,9 @@ type EventVariableDefinition struct {
// Name is the name of the variable used within EventType attribute values enclosed in curly brackets.
Name string `json:"name"`
// Pattern is a CESQL LIKE pattern that the attribute value would adhere to.
Pattern string `json:"pattern"`
Pattern string `json:"pattern,omitempty"`
// Example is an example of an attribute value that adheres to the CESQL pattern.
Example string `json:"example"`
Example string `json:"example,omitempty"`
}

// EventTypeStatus represents the current state of a EventType.
Expand Down

0 comments on commit 7d00dad

Please sign in to comment.