Fix/mobility-devkit: resolve validation errors across devkit and example payloads - #90
Open
riteshkparouha-cyber wants to merge 3 commits into
Open
Fix/mobility-devkit: resolve validation errors across devkit and example payloads#90riteshkparouha-cyber wants to merge 3 commits into
riteshkparouha-cyber wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Devkit & Infrastructure
nfh.global/testnet in devkit config to resolve failed to lookup registry:
context.network_id "nfh.global/testnet-mobility" is not in
network_memberships of subscriber "bpp.example.com"
outside update and cancel in sandbox-payloads/; spec restricts try to the
two-phase preview/commit pattern on those two actions only
sandbox-bpp to serve static payloads through nfh.global/testnet
examples from docs/example_implementations/ride_hailing/; mobility discover
is peer-to-peer so the catalog flow does not apply
Example JSON Fixes
All fixes are grounded in the Beckn Protocol Specification v2 — beckn.yaml.
were using a plain string (e.g. "cause": "downstream timeout") as a
placeholder for this field. The spec defines cause as a self-referencing
Error object, enabling structured, typed error chains (e.g. wrapping a
registry failure or provider error inside a parent error). A string value
fails schema validation and loses that chain structure entirely.
enables a two-phase preview/commit pattern where the receiving NP computes
revised terms without mutating state. The spec only defines this behaviour
for /update and /cancel. Including try on actions like discover, init,
confirm, etc. is meaningless per the spec and was carried over as
copy-paste noise from update/cancel templates.
quantity as a required field on every resource item inside a commitment
(alongside id). It was missing from the generic lifecycle example files,
causing schema validation to fail on those payloads. Added as {"value": 1,
"unit": "unit"} to satisfy the constraint.
minItems: 4 on bbox, representing a bounding box as [west, south, east,
north] (southwest lon/lat + northeast lon/lat) per the GeoJSON standard.
The placeholder value [0] was a single-element array that both violates the
schema constraint and carries no geographic meaning.