sul-dlss / cocina-models

Cocina repository data model (implemented in Ruby)
https://sul-dlss.github.io/cocina-models/
3 stars 0 forks source link

[WIP] validate that cdl for specific conditions #422

Closed peetucket closed 2 years ago

peetucket commented 2 years ago

Why was this change made? 🤔

Ref #405 - validate the CDL attribute is present when access="stanford" and view="one"

TODO: can we set a default of false instead of throwing a validation error instead? I'm not sure of the best way of doing this.

How was this change tested? 🤨

new tests

jcoyne commented 2 years ago

@peetucket I think this may have missed the intention of #405. We were looking for a better way to write the openapi.yml, not to add a new ruby validator.

peetucket commented 2 years ago

Ok, so investigate if it's possible to do this type of validation via openapi specification instead of custom class(es) and implement if so.