Closed jordajm closed 5 years ago
Note: this may not be as straightforward as I originally thought it would be for the jCal schema validation... I realized that we need fewer fields on the "offer" time slots than on the "listing" availability data, so the jCal schema definitions aren't identical across listing and offer schemas any longer.
Closing as I don't think we need this anymore
Per @franckc's suggestion, we should look into using
$merge
to DRY up the listing and offer schemas in origin-js. This was prompted by the addition of a large jCal definition for validating fractional usage listings and offers.If we pull out all of the repeated item definitions in the listing and offer schemas into their own files and then pull them into the schemas using
$merge
, we'd be able to DRY up the schemas quite a bit.We'd need to use this library or a similar one: https://github.com/epoberezkin/ajv-merge-patch