Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,13 @@
- apiGroup
- kind
- name
type: object
required:
- email
- familyName
- givenName
type: object
status:
properties:
conditions:

Check warning on line 97 in config/crd/bases/notification/notification.miloapis.com_contacts.yaml

View check run for this annotation

JoggrBot / Joggr

config/crd/bases/notification/notification.miloapis.com_contacts.yaml#L91-L97

"docs/api/notification.md" is outdated: CRD YAML removes `familyName` and `givenName` from the required fields, so existing documentation about required fields could be outdated.
default:
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: Waiting for contact to be created
Expand Down
4 changes: 2 additions & 2 deletions docs/api/notification.md
Original file line number Diff line number Diff line change
Expand Up @@ -857,14 +857,14 @@ ContactSpec defines the desired state of Contact.
<td>
<br/>
</td>
<td>true</td>
<td>false</td>
</tr><tr>
<td><b>givenName</b></td>
<td>string</td>
<td>
<br/>
</td>
<td>true</td>
<td>false</td>
</tr><tr>
<td><b><a href="#contactspecsubject">subject</a></b></td>
<td>object</td>
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/notification/v1alpha1/contact_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@
// +kubebuilder:validation:Type=object
type ContactSpec struct {
// Subject is a reference to the subject of the contact.
// +kubebuilder:validation:Optional
SubjectRef *SubjectReference `json:"subject,omitempty"`

// +kubebuilder:validation:Required
// +kubebuilder:validation:Optional
FamilyName string `json:"familyName,omitempty"`

Check warning on line 66 in pkg/apis/notification/v1alpha1/contact_types.go

View check run for this annotation

JoggrBot / Joggr

pkg/apis/notification/v1alpha1/contact_types.go#L61-L66

"docs/api/notification.md" is outdated: `familyName` and `givenName` changed from required to optional in ContactSpec, which may cause confusion if documentation (currently) does not clarify they are now optional.
// +kubebuilder:validation:Required
// +kubebuilder:validation:Optional
GivenName string `json:"givenName,omitempty"`

// +kubebuilder:validation:Required
Expand Down