When a parameter has no valid enumerations defined in an enum, we will now discard the enumeration in the parse result. Previously the parser would create an malformed enumeration element which causes Minim serialiser to trip up. It was producing an enum element with empty content which was contained within another enum element as content inside an array. This is not valid.
I think the best case is to discard this at the parser level as it is invalid specification. The user already receives warnings regarding the case.
Also to note in JSON Schema it says enum should have at least one element.
The value of this keyword MUST be an array. This array SHOULD have at least one element. Elements in the array SHOULD be unique.
When a parameter has no valid enumerations defined in an
enum
, we will now discard the enumeration in the parse result. Previously the parser would create an malformed enumeration element which causes Minim serialiser to trip up. It was producing anenum
element with empty content which was contained within anotherenum
element as content inside an array. This is not valid.I think the best case is to discard this at the parser level as it is invalid specification. The user already receives warnings regarding the case.
Also to note in JSON Schema it says enum should have at least one element.