KB-2 Withdrawn
OCIRegistry rejects an empty defaultContentType
Report#
The report said that OCIRegistry validation rejects an empty spec.defaultContentType, but
the field is optional.
Why it is withdrawn#
The field is required by design:
- The JSON tag has no
omitempty. - A test in convoy expects that an empty value fails validation.
A code comment in the validation function says empty is allowed; the controller defaults it.
That comment is wrong. The API Reference marks the field as required.
In the code
convoy v0.9.0
api/source.validateOCIRegistrySpecapi/source/validation.go:228