Closed OpossumPetya closed 4 years ago
Oh, so, technically dt
isn't required: If not provided, there will be a default value. One of the benefits of things like JSON schema and/or XML schema is that the client can validate the data it is about to send. So, if dt
is required, it must send an object with a dt
property, and, if the client supports format
, the value must be an ISO8601 date/time. Even the empty string is technically invalid (which is why I have to delete properties with the empty string, which there might be a bug around that).
read_schema
should automatically not set the field as required if it has a default value (otherwise that's a bug).
I'm definitely open to discussion as to whether this is the correct behavior or not, though I think it makes the most sense: Fields that have defaults aren't required to be provided by the user.
ah, understood. makes sense. thanks for the detailed explanation! I'll close this.
Standalone Yancy. SQLite DB. I simplified it to the minimum.
DB schema:
yancy.conf
:When
dt
is required, I receive following error in UI when adding new valueAnd this in console
If I remove
dt
from therequired
list, item is inserted successfully. I feel like I'm missing something maybe?