From e7f29f8bb37fd3147bcd1bd9fdb03b4d73bb0d49 Mon Sep 17 00:00:00 2001 From: SpectralHiss Date: Tue, 19 Dec 2023 20:36:49 +0000 Subject: [PATCH] UTF8Value -> utf8Value in CRD JSON schema * Still following Go standard with UTF8Value for struct field name Signed-off-by: SpectralHiss --- deploy/crds/crd-certificates.yaml | 6 +++--- internal/apis/certmanager/types_certificate.go | 6 +++--- internal/apis/certmanager/v1alpha2/types_certificate.go | 6 +++--- internal/apis/certmanager/v1alpha3/types_certificate.go | 6 +++--- internal/apis/certmanager/v1beta1/types_certificate.go | 6 +++--- pkg/apis/certmanager/v1/types_certificate.go | 6 +++--- test/e2e/suite/certificates/othernamesan.go | 2 +- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/deploy/crds/crd-certificates.yaml b/deploy/crds/crd-certificates.yaml index 2f2585037..94b2f9cad 100644 --- a/deploy/crds/crd-certificates.yaml +++ b/deploy/crds/crd-certificates.yaml @@ -232,12 +232,12 @@ spec: items: type: object properties: - UTF8Value: - description: Utf8Value is the string value of the otherName SAN. The UTF8value accepts any valid UTF8 string to set as value for the otherName SAN. - type: string oid: description: OID is the object identifier for the otherName SAN. The object identifier must be expressed as a dotted string, for example, "1.2.840.113556.1.4.221". type: string + utf8Value: + description: utf8Value is the string value of the otherName SAN. The utf8Value accepts any valid UTF8 string to set as value for the otherName SAN. + type: string privateKey: description: Private key options. These include the key algorithm and size, the used encoding and the rotation policy. type: object diff --git a/internal/apis/certmanager/types_certificate.go b/internal/apis/certmanager/types_certificate.go index 7522a1ec0..a483fca5e 100644 --- a/internal/apis/certmanager/types_certificate.go +++ b/internal/apis/certmanager/types_certificate.go @@ -260,9 +260,9 @@ type OtherName struct { // example, "1.2.840.113556.1.4.221". OID string `json:"oid,omitempty"` - // Utf8Value is the string value of the otherName SAN. - // The UTF8value accepts any valid UTF8 string to set as value for the otherName SAN. - UTF8Value string `json:"UTF8Value,omitempty"` + // utf8Value is the string value of the otherName SAN. + // The utf8Value accepts any valid UTF8 string to set as value for the otherName SAN. + UTF8Value string `json:"utf8Value,omitempty"` } // CertificatePrivateKey contains configuration options for private keys diff --git a/internal/apis/certmanager/v1alpha2/types_certificate.go b/internal/apis/certmanager/v1alpha2/types_certificate.go index 0fc5a510c..77b82cac5 100644 --- a/internal/apis/certmanager/v1alpha2/types_certificate.go +++ b/internal/apis/certmanager/v1alpha2/types_certificate.go @@ -247,9 +247,9 @@ type OtherName struct { // example, "1.2.840.113556.1.4.221". OID string `json:"oid,omitempty"` - // Utf8Value is the string value of the otherName SAN. - // The UTF8value accepts any valid UTF8 string to set as value for the otherName SAN. - UTF8Value string `json:"UTF8Value,omitempty"` + // utf8Value is the string value of the otherName SAN. + // The utf8Value accepts any valid UTF8 string to set as value for the otherName SAN. + UTF8Value string `json:"utf8Value,omitempty"` } // CertificatePrivateKey contains configuration options for private keys diff --git a/internal/apis/certmanager/v1alpha3/types_certificate.go b/internal/apis/certmanager/v1alpha3/types_certificate.go index e998f0df4..2cb0fa217 100644 --- a/internal/apis/certmanager/v1alpha3/types_certificate.go +++ b/internal/apis/certmanager/v1alpha3/types_certificate.go @@ -245,9 +245,9 @@ type OtherName struct { // example, "1.2.840.113556.1.4.221". OID string `json:"oid,omitempty"` - // Utf8Value is the string value of the otherName SAN. - // The UTF8value accepts any valid UTF8 string to set as value for the otherName SAN. - UTF8Value string `json:"UTF8Value,omitempty"` + // utf8Value is the string value of the otherName SAN. + // The utf8Value accepts any valid UTF8 string to set as value for the otherName SAN. + UTF8Value string `json:"utf8Value,omitempty"` } // CertificatePrivateKey contains configuration options for private keys diff --git a/internal/apis/certmanager/v1beta1/types_certificate.go b/internal/apis/certmanager/v1beta1/types_certificate.go index d3e2c3a6f..8245341ab 100644 --- a/internal/apis/certmanager/v1beta1/types_certificate.go +++ b/internal/apis/certmanager/v1beta1/types_certificate.go @@ -222,9 +222,9 @@ type OtherName struct { // example, "1.2.840.113556.1.4.221". OID string `json:"oid,omitempty"` - // Utf8Value is the string value of the otherName SAN. - // The UTF8value accepts any valid UTF8 string to set as value for the otherName SAN. - UTF8Value string `json:"UTF8Value,omitempty"` + // utf8Value is the string value of the otherName SAN. + // The utf8Value accepts any valid UTF8 string to set as value for the otherName SAN. + UTF8Value string `json:"utf8Value,omitempty"` } // CertificatePrivateKey contains configuration options for private keys diff --git a/pkg/apis/certmanager/v1/types_certificate.go b/pkg/apis/certmanager/v1/types_certificate.go index c8806880a..e57cc8539 100644 --- a/pkg/apis/certmanager/v1/types_certificate.go +++ b/pkg/apis/certmanager/v1/types_certificate.go @@ -287,9 +287,9 @@ type OtherName struct { // example, "1.2.840.113556.1.4.221". OID string `json:"oid,omitempty"` - // Utf8Value is the string value of the otherName SAN. - // The UTF8value accepts any valid UTF8 string to set as value for the otherName SAN. - UTF8Value string `json:"UTF8Value,omitempty"` + // utf8Value is the string value of the otherName SAN. + // The utf8Value accepts any valid UTF8 string to set as value for the otherName SAN. + UTF8Value string `json:"utf8Value,omitempty"` } // CertificatePrivateKey contains configuration options for private keys diff --git a/test/e2e/suite/certificates/othernamesan.go b/test/e2e/suite/certificates/othernamesan.go index d1ffef618..fbda10545 100644 --- a/test/e2e/suite/certificates/othernamesan.go +++ b/test/e2e/suite/certificates/othernamesan.go @@ -157,7 +157,7 @@ var _ = framework.CertManagerDescribe("othername san processing", func() { Expect(cert.Extensions).To(ContainElement(expectedSanExtension)) }) - FIt("Should error if a certificate is supplied with an othername containing an invalid oid value", func() { + It("Should error if a certificate is supplied with an othername containing an invalid oid value", func() { _, err := createCertificate(f, []cmapi.OtherName{ { OID: "BAD_OID",