Open Css-IanM opened 7 years ago
Hi Ian, this isn't something currently supported out the box with Iridium's validation framework, that being said, there's no reason you can't add a custom validation plugin which allows you to specify intersect types.
I'm currently in the middle of SREcon and don't have a bunch of free time, but I'll see if I can out something together as part of the 8.x alpha to address this use case (potentially involving a rewrite of the validation framework and adding support for MongoDB native collection validation as part of that).
Could anyone point towards documentation or an example of more complex types? I'm working on migrating a complex Shopping Cart which I would like to assign sub-document ObjectIDs or some other unique identifier at the scope of the user's cart. An example i'm trying to model for below. 1.) Not sure the best way to handle an object that could be one of two types. 2.) how to specify sub document ObjectIds. 3.) I Imagine for the Endpoint denormalization i have on the line items I will have to just make a constant for that.