beckn / beckn/protocol-specifications-v2
Action api specification should include required attributes at a deeper level to facilitate effective schema validation
- Dominant language
- No language data
- Stars
- 15
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
Consider /beckn/init API spec, it defines that message.order is required in the payload. [init spec
](https://github.com/beckn/protocol-specifications-v2/blob/adcd1737082da1fa5057a56d2f8182ecf808eee8/api/beckn.yaml#L285)
Instead of making order object to be required if it lists order.payment, order.fulfillment and all necessary sub-objects as required, then that allows for more effective schema validation.
Even the older v1 spec follows the less granular approach.
This approach also enables downstream network specific api payload validation instead of defining such nuances in the respective TSDs or example payloads.
Contributor guide
Assessment
This issue has not been assessed yet.