Uh oh!
There was an error while loading. Please reload this page.
feat: Add context-independent validation for id references - #407
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Luke Winship <luke.winship@gmail.com>
Co-authored-by: Luke Winship <luke.winship@gmail.com>
Co-authored-by: Luke Winship <luke.winship@gmail.com>
…openactive/data-model-validator into feature/id-reference-validation
| 'BOrderProposalRequest', | ||
| 'OrderPatch', | ||
| ]; | ||
| this.targetFields = { OrderItem: ['acceptedOffer', 'orderedItem'] }; |
There was a problem hiding this comment.
To make this more generically applicable, it would be good to drive this from the data models.
For example we already have this: https://github.com/openactive/data-models/blob/9bc59064c0f0cb822388212cc79049dbdb5c9893/versions/2.x/models/Order.json#L163-L164
"allowReferencing": true,So would be good to add referencedFields alongside these:
"orderProposalRequest": {
"requiredFields": [
"type",
"orderProposalVersion"
],
"recommendedFields": [],A good hint for how to do this can be found here:
Uh oh!
There was an error while loading. Please reload this page.
Fixes: #402