Description
TL;DR: I have no idea how to define compliance criteria for allowEmptyValue: false
, which is the default behavior, with setting true
being NOT RECOMMENDED.
<rant>
The clarification added in 3.0.2 just says using it is NOT RECOMMENDED, which would, AFAICT, leave the default false
behavior in place. Looking at the issue regarding that clarification, there is a lot there that never made it into the spec. Some of that says that setting it to true
allows the undefined value behavior already defined by RFC6570.
However, style
, explode
, and allowReseved
already control the RFC6570 behavior. Are we by default forbidding empty values? Does that mean RFC6570's undefined values (which includes null
, empty arrays, empty objects, and objects where all properties are null
, but NOT the empty string)? Does it impact the empty string as well? If schema
allows these does the default allowEmptyValue: false
behavior contradict that? How are implementations expected to support this?
If using content
, does allowEmptyValue
have meaning? What if the content
is legitimately a zero-length string?
This seems like a field with a default value that blocks common cases in a very non-obvious way, requiring complex code to work around the normal behavior of Schema Objects, Media Type Objects, and RFC6570. Do we really expect implementations to enforce this? If we are recommending against its use, how do we expect users to support empty values, which can easily happen by accident (particularly empty arrays)?
</rant>