update schemas and create a validateHandler function

This commit is contained in:
AshwiniK-protean
2025-03-02 18:44:16 +05:30
parent 4b940d9e51
commit 4559ac3e5f
28 changed files with 3053 additions and 3552 deletions

View File

@@ -22,25 +22,8 @@
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order_id": {
"$ref": "definitions.json#/$defs/Order"
},
"cancellation_reason_id": {
"$ref": "definitions.json#/$defs/Option"
},
"descriptor": {
"$ref": "definitions.json#/$defs/Descriptor"
}
},
"required": [
"order_id"
]
}
},
"required": [
"message",

File diff suppressed because it is too large Load Diff

View File

@@ -7,7 +7,7 @@
"$ref": "../../core/v1.1.0/cancel.json#"
},
{
"$ref": "./init.json#/allOf/2"
"$ref": "init.json#/allOf/2"
},
{
"properties": {

View File

@@ -7,15 +7,15 @@
"$ref": "../../core/v1.1.0/confirm.json#"
},
{
"$ref": "./init.json#/allOf/2"
"$ref": "./init.json#/allOf/1"
},
{
"$ref": "./init.json#/allOf/3"
"$ref": "./init.json#/allOf/2"
},
{
"allOf": [
{
"$ref": "./on_select.json#/allOf/8/allOf/0"
"$ref": "./on_select.json#/allOf/5"
},
{
"properties": {
@@ -77,7 +77,7 @@
{
"allOf": [
{
"$ref": "./init.json#/allOf/6"
"$ref": "./init.json#/allOf/7"
},
{
"properties": {

View File

@@ -2,395 +2,549 @@
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "init",
"type": "object",
"allOf": [
{ "$ref": "../../core/v1.1.0/init.json#" },
"allOf": [
{
"allOf": [
{ "$ref": "./search.json#/properties/context/allOf/0" },
{ "required": ["bpp_id", "bpp_uri"] }
]
"$ref": "../../core/v1.1.0/init.json#"
},
{
"properties": {
"message": {
"properties": {
"order": {
"properties": {
"context": {
"type": "object",
"properties": {
"provider": {
"type": "object",
"properties": {
"id": { "type": "string" }
},
"required": ["id"]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" }
"allOf": [
{
"$ref": "./search.json#/properties/context/allOf/0"
},
"required": ["id"]
}
}
},
"required": ["provider", "items"]
{
"required": [
"bpp_id",
"bpp_uri"
]
}
]
}
}
}
}
},
{ "$ref": "./confirm.json#/allOf/4" },
{ "$ref": "./on_select.json#" },
{
"properties": {
"message": {
"properties": {
"order": {
"required": ["fulfillments"]
}
}
}
}
},
{
"properties": {
"message": {
"type": "object",
"properties": {
"order": {
"type": "object",
"properties": {
"payments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"params": {
"properties": {
"message": {
"properties": {
"order": {
"type": "object",
"properties": {
"amount": {
"type": "string",
"pattern": "^\\d+(\\.\\d{1,2})?$"
}
}
},
"type": {
"type": "string",
"enum": ["PRE-ORDER", "ON-FULFILLMENT", "POST-FULFILLMENT"]
},
"status": {
"type": "string",
"enum": ["PAID", "NOT-PAID"]
},
"collected_by": {
"type": "string",
"enum": ["BAP", "BPP"]
},
"tags": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"uniqueItems": true,
"items": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": ["SETTLEMENT_TERMS", "BUYER_FINDER_FEES"]
}
}
}
},
"required": ["descriptor"]
}
}
},
"required": ["type", "status", "collected_by", "tags"],
"allOf": [
{
"if": {
"allOf": [
{ "properties": { "collected_by": { "const": "BAP" } } },
{ "properties": { "type": { "const": "PRE-ORDER" } } }
]
},
"then": {
"properties": {
"tags": {
"items": {
"if": {
"properties": {
"descriptor": {
"properties": { "code": { "const": "SETTLEMENT_TERMS" } }
"provider": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
}
},
"then": {
"properties": {
"list": {
"allOf": [
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": { "code": { "const": "STATIC_TERMS" } }
},
"value": {
"type": "string",
"format": "uri"
}
}
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": { "code": { "const": "SETTLEMENT_BASIS" } }
},
"value": {
"type": "string",
"enum": ["DELIVERY"]
}
}
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": { "code": { "const": "SETTLEMENT_WINDOW" } }
},
"value": {
"type": "string"
}
}
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": { "code": { "const": "DELAY_INTEREST" } }
},
"value": {
"type": "string",
"pattern": "^\\d+(\\.\\d{1,2})?$"
}
}
}
"required": [
"id"
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
]
}
}
},
"required": [
"id"
]
}
}
}
}
}
},
{
"if": {
"allOf": [
{ "properties": { "collected_by": { "const": "BPP" } } },
{ "properties": { "type": { "const": "PRE-ORDER" } } }
]
},
"then": {
"properties": {
"tags": {
"items": {
"if": {
"properties": {
"descriptor": {
"properties": { "code": { "const": "SETTLEMENT_TERMS" } }
}
}
},
"then": {
"properties": {
"list": {
"allOf": [
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": { "code": { "const": "STATIC_TERMS" } }
},
"value": {
"type": "string",
"format": "uri"
}
}
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": { "code": { "const": "SETTLEMENT_BASIS" } }
},
"value": {
"type": "string",
"enum": ["DELIVERY"]
}
}
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": { "code": { "const": "SETTLEMENT_WINDOW" } }
},
"value": {
"type": "string"
}
}
}
}
]
}
}
}
}
}
}
}
},
{
"if": {
"allOf": [
{ "properties": { "collected_by": { "const": "BPP" } } },
{ "properties": { "type": { "const": "ON-FULFILLMENT" } } }
]
},
"then": {
"properties": {
"tags": {
"items": {
"if": {
"properties": {
"descriptor": {
"properties": { "code": { "const": "SETTLEMENT_TERMS" } }
}
}
},
"then": {
"properties": {
"list": {
"allOf": [
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": { "code": { "const": "STATIC_TERMS" } }
},
"value": {
"type": "string",
"format": "uri"
}
}
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": { "code": { "const": "SETTLEMENT_BASIS" } }
},
"value": {
"type": "string",
"enum": ["DELIVERY"]
}
}
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": { "code": { "const": "SETTLEMENT_WINDOW" } }
},
"value": {
"type": "string"
}
}
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": { "code": { "const": "DELAY_INTEREST" } }
},
"value": {
"type": "string",
"pattern": "^\\d+(\\.\\d{1,2})?$"
}
}
}
}
]
}
}
}
}
}
}
}
}
]
}
"required": [
"provider",
"items"
]
}
}
}
}
}
}
}
},
{
"properties": {
"message": {
"properties": {
"order": {
"properties": {
"billing": {
"required": ["name"]
"$ref": "./confirm.json#/allOf/4"
},
{
"$ref": "./on_select.json#"
},
{
"properties": {
"message": {
"properties": {
"order": {
"required": [
"fulfillments"
]
}
}
}
}
},
{
"properties": {
"message": {
"type": "object",
"properties": {
"order": {
"type": "object",
"properties": {
"payments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"params": {
"type": "object",
"properties": {
"amount": {
"type": "string",
"pattern": "^\\d+(\\.\\d{1,2})?$"
}
}
},
"type": {
"type": "string",
"enum": [
"PRE-ORDER",
"ON-FULFILLMENT",
"POST-FULFILLMENT"
]
},
"status": {
"type": "string",
"enum": [
"PAID",
"NOT-PAID"
]
},
"collected_by": {
"type": "string",
"enum": [
"BAP",
"BPP"
]
},
"tags": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"uniqueItems": true,
"items": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"SETTLEMENT_TERMS",
"BUYER_FINDER_FEES"
]
}
}
}
},
"required": [
"descriptor"
]
}
}
},
"required": [
"type",
"status",
"collected_by",
"tags"
],
"allOf": [
{
"if": {
"allOf": [
{
"properties": {
"collected_by": {
"const": "BAP"
}
}
},
{
"properties": {
"type": {
"const": "PRE-ORDER"
}
}
}
]
},
"then": {
"properties": {
"tags": {
"items": {
"if": {
"properties": {
"descriptor": {
"properties": {
"code": {
"const": "SETTLEMENT_TERMS"
}
}
}
}
},
"then": {
"properties": {
"list": {
"allOf": [
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": {
"const": "STATIC_TERMS"
}
}
},
"value": {
"type": "string",
"format": "uri"
}
}
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": {
"const": "SETTLEMENT_BASIS"
}
}
},
"value": {
"type": "string",
"enum": [
"DELIVERY"
]
}
}
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": {
"const": "SETTLEMENT_WINDOW"
}
}
},
"value": {
"type": "string"
}
}
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": {
"const": "DELAY_INTEREST"
}
}
},
"value": {
"type": "string",
"pattern": "^\\d+(\\.\\d{1,2})?$"
}
}
}
}
]
}
}
}
}
}
}
}
},
{
"if": {
"allOf": [
{
"properties": {
"collected_by": {
"const": "BPP"
}
}
},
{
"properties": {
"type": {
"const": "PRE-ORDER"
}
}
}
]
},
"then": {
"properties": {
"tags": {
"items": {
"if": {
"properties": {
"descriptor": {
"properties": {
"code": {
"const": "SETTLEMENT_TERMS"
}
}
}
}
},
"then": {
"properties": {
"list": {
"allOf": [
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": {
"const": "STATIC_TERMS"
}
}
},
"value": {
"type": "string",
"format": "uri"
}
}
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": {
"const": "SETTLEMENT_BASIS"
}
}
},
"value": {
"type": "string",
"enum": [
"DELIVERY"
]
}
}
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": {
"const": "SETTLEMENT_WINDOW"
}
}
},
"value": {
"type": "string"
}
}
}
}
]
}
}
}
}
}
}
}
},
{
"if": {
"allOf": [
{
"properties": {
"collected_by": {
"const": "BPP"
}
}
},
{
"properties": {
"type": {
"const": "ON-FULFILLMENT"
}
}
}
]
},
"then": {
"properties": {
"tags": {
"items": {
"if": {
"properties": {
"descriptor": {
"properties": {
"code": {
"const": "SETTLEMENT_TERMS"
}
}
}
}
},
"then": {
"properties": {
"list": {
"allOf": [
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": {
"const": "STATIC_TERMS"
}
}
},
"value": {
"type": "string",
"format": "uri"
}
}
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": {
"const": "SETTLEMENT_BASIS"
}
}
},
"value": {
"type": "string",
"enum": [
"DELIVERY"
]
}
}
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": {
"const": "SETTLEMENT_WINDOW"
}
}
},
"value": {
"type": "string"
}
}
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": {
"const": "DELAY_INTEREST"
}
}
},
"value": {
"type": "string",
"pattern": "^\\d+(\\.\\d{1,2})?$"
}
}
}
}
]
}
}
}
}
}
}
}
}
]
}
}
}
}
}
}
}
},
{
"properties": {
"message": {
"properties": {
"order": {
"properties": {
"billing": {
"required": [
"name"
]
}
},
"required": [
"billing"
]
}
}
},
"required": ["billing"]
}
}
}
}
}
]
}
]
}

View File

@@ -1,16 +1,13 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/on_cancel",
"$id": "on_cancel",
"type": "object",
"allOf": [
{
"$ref": "../../core/v1.1.0/confirm.json#"
},
{
"$ref": "https://beckn.org/schema/confirm#"
},
{
"$ref": "./init.json#/allOf/2"
"$ref": "./init.json#/allOf/1"
}
]
}

View File

@@ -1,16 +1,13 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/on_confirm",
"$id": "on_confirm",
"type": "object",
"allOf": [
{
"$ref": "../../core/v1.1.0/confirm.json#"
},
{
"$ref": "https://beckn.org/schema/confirm#"
},
{
"$ref": "./init.json#/allOf/2"
"$ref": "./init.json#/allOf/1"
}
]
}

View File

@@ -7,10 +7,7 @@
"$ref": "../../core/v1.1.0/on_init.json#"
},
{
"$ref": "https://beckn.org/schema/on_init#"
},
{
"$ref": "./init.json#/allOf/2"
"$ref": "./init.json#/allOf/1"
},
{
"properties": {
@@ -35,7 +32,7 @@
}
},
{
"$ref": "./on_select.json#/allOf/5"
"$ref": "./confirm.json#/allOf/5"
},
{
"$ref": "./on_select.json#/allOf/6"
@@ -69,7 +66,7 @@
}
},
{
"$ref": "./confirm.json#/allOf/5/allOf/1"
"$ref": "./confirm.json#/allOf/4/allOf/1"
},
{
"properties": {
@@ -226,7 +223,7 @@
]
},
{
"$ref": "./confirm.json#/allOf/7"
"$ref": "./confirm.json#/allOf/6"
},
{
"allOf": [

View File

@@ -7,10 +7,7 @@
"$ref": "../../core/v1.1.0/confirm.json#"
},
{
"$ref": "https://beckn.org/schema/confirm#"
},
{
"$ref": "./init.json#/allOf/2"
"$ref": "./init.json#/allOf/1"
}
]
}

View File

@@ -7,10 +7,7 @@
"$ref": "../../core/v1.1.0/on_search.json#"
},
{
"$ref": "https://beckn.org/schema/on_search#"
},
{
"$ref": "./init.json#/allOf/2"
"$ref": "./init.json#/allOf/1"
},
{
"properties": {

View File

@@ -7,604 +7,16 @@
"$ref": "../../core/v1.1.0/on_select.json#"
},
{
"$ref": "./init.json#/allOf/2"
"$ref": "./init.json#/allOf/1"
},
{
"properties": {
"message": {
"type": "object",
"properties": {
"order": {
"type": "object",
"properties": {
"items": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"descriptor": {
"type": "object",
"properties": {
"name": { "type": "string" },
"code": { "type": "string", "enum": ["RIDE"] }
},
"required": ["code"]
},
"price": {
"type": "object",
"properties": { "value": { "type": "string" } },
"required": ["value"]
},
"fulfillment_ids": { "minItems": 1 },
"location_ids": { "minItems": 1 }
},
"required": ["id", "price", "descriptor"]
}
}
},
"required": ["items"]
}
}
}
}
"$ref": "./on_init.json#/allOf/2"
},
{
"allOf": [
{
"properties": {
"message": {
"properties": {
"order": {
"properties": {
"items": {
"items": {
"properties": {
"tags": {
"items": {
"if": {
"properties": {
"descriptor": {
"properties": {
"code": { "const": "FARE_POLICY" }
}
}
}
},
"then": {
"properties": {
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"descriptor": {
"properties": {
"code": {
"type": "string",
"enum": [
"MIN_FARE",
"MIN_FARE_DISTANCE_KM",
"PER_KM_CHARGE",
"PICKUP_CHARGE",
"WAITING_CHARGE_PER_MIN",
"NIGHT_CHARGE_MULTIPLIER",
"NIGHT_SHIFT_START_TIME",
"NIGHT_SHIFT_END_TIME",
"EXTERNAL_REF"
]
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
},
{
"properties": {
"message": {
"properties": {
"order": {
"properties": {
"items": {
"items": {
"properties": {
"tags": {
"items": {
"if": {
"properties": {
"descriptor": {
"properties": {
"code": { "const": "FARE_POLICY" }
}
}
}
},
"then": {
"properties": {
"list": {
"allOf": [
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": { "const": "MIN_FARE" }
},
"required": ["code"]
},
"value": {
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
}
},
"required": ["descriptor", "value"]
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": { "const": "MIN_FARE_DISTANCE_KM" }
},
"required": ["code"]
},
"value": {
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
}
},
"required": ["descriptor", "value"]
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": { "const": "PER_KM_CHARGE" }
},
"required": ["code"]
},
"value": {
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
}
},
"required": ["descriptor", "value"]
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": { "const": "PICKUP_CHARGE" }
},
"required": ["code"]
},
"value": {
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
}
},
"required": ["descriptor", "value"]
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": { "const": "WAITING_CHARGE_PER_MIN" }
},
"required": ["code"]
},
"value": {
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
}
},
"required": ["descriptor", "value"]
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": { "const": "NIGHT_CHARGE_MULTIPLIER" }
},
"required": ["code"]
},
"value": {
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
}
},
"required": ["descriptor", "value"]
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": { "const": "NIGHT_SHIFT_START_TIME" }
},
"required": ["code"]
},
"value": {
"type": "string",
"pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$"
}
},
"required": ["descriptor", "value"]
}
}
]
}
}
}
}
}
}
}
}
}
}
}
}
}
},
{
"properties": {
"message": {
"properties": {
"order": {
"properties": {
"items": {
"items": {
"properties": {
"tags": {
"items": {
"if": {
"properties": {
"descriptor": {
"properties": {
"code": { "const": "FARE_POLICY" }
}
}
}
},
"then": {
"properties": {
"list": {
"type": "array",
"items": {
"allOf": [
{
"if": {
"properties": {
"descriptor": {
"properties": {
"code": {
"enum": [
"MIN_FARE",
"MIN_FARE_DISTANCE_KM",
"PER_KM_CHARGE",
"PICKUP_CHARGE",
"WAITING_CHARGE_PER_MIN",
"NIGHT_CHARGE_MULTIPLIER"
]
}
}
}
}
},
"then": {
"properties": {
"value": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
},
"required": ["descriptor", "value"]
}
},
{
"if": {
"properties": {
"descriptor": {
"properties": {
"code": {
"enum": [
"NIGHT_SHIFT_START_TIME",
"NIGHT_SHIFT_END_TIME"
]
}
}
}
}
},
"then": {
"properties": {
"value": {
"type": "string",
"pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$"
}
},
"required": ["descriptor", "value"]
}
},
{
"if": {
"properties": {
"descriptor": {
"properties": {
"code": { "const": "EXTERNAL_REF" }
}
}
}
},
"then": {
"properties": {
"value": {
"type": "string",
"pattern": "^https?://[^\\s/$.?#].[^\\s]*$"
}
},
"required": ["descriptor", "value"]
}
}
]
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
]
"$ref": "./confirm.json#/allOf/5"
},
{
"allOf": [
{
"properties": {
"message": {
"properties": {
"order": {
"properties": {
"items": {
"items": {
"properties": {
"tags": {
"items": {
"if": {
"properties": {
"descriptor": {
"properties": {
"code": { "const": "INFO" }
}
}
}
},
"then": {
"properties": {
"list": {
"type": "array",
"items": {
"type": "object",
"properties": {
"descriptor": {
"properties": {
"code": {
"type": "string",
"enum": [
"DISTANCE_TO_NEAREST_DRIVER_METER",
"ETA_TO_NEAREST_DRIVER_MIN"
]
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
},
{
"properties": {
"message": {
"properties": {
"order": {
"properties": {
"items": {
"items": {
"properties": {
"tags": {
"items": {
"if": {
"properties": {
"descriptor": {
"properties": {
"code": { "const": "INFO" }
}
}
}
},
"then": {
"properties": {
"list": {
"allOf": [
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": { "const": "ETA_TO_NEAREST_DRIVER_MIN" }
},
"required": ["code"]
},
"value": {
"type": "string",
"pattern": "^\\d+(\\.\\d+)?$"
}
},
"required": ["descriptor", "value"]
}
},
{
"contains": {
"type": "object",
"properties": {
"descriptor": {
"type": "object",
"properties": {
"code": { "const": "DISTANCE_TO_NEAREST_DRIVER_METER" }
},
"required": ["code"]
},
"value": {
"type": "string",
"pattern": "^\\d+(\\.\\d+)?$"
}
},
"required": ["descriptor", "value"]
}
}
]
}
}
}
}
}
}
}
}
}
}
}
}
}
},
{
"properties": {
"message": {
"properties": {
"order": {
"properties": {
"items": {
"type": "array",
"items": {
"properties": {
"tags": {
"items": {
"if": {
"properties": {
"descriptor": {
"properties": {
"code": { "const": "INFO" }
}
}
}
},
"then": {
"properties": {
"list": {
"type": "array",
"items": {
"allOf": [
{
"if": {
"properties": {
"descriptor": {
"properties": {
"code": {
"enum": [
"DISTANCE_TO_NEAREST_DRIVER_METER",
"ETA_TO_NEAREST_DRIVER_MIN"
]
}
}
}
}
},
"then": {
"properties": {
"value": {
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?$"
}
},
"required": ["descriptor", "value"]
}
}
]
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
]
"$ref": "./on_init.json#/allOf/5"
},
{
"allOf": [
@@ -784,6 +196,9 @@
}
]
},
{
"$ref": "./on_init.json#/allOf/7"
},
{
"properties": {
"message": {
@@ -807,6 +222,9 @@
}
}
}
}
},
{
"$ref": "./on_init.json#/allOf/8"
}
]
}

View File

@@ -7,10 +7,7 @@
"$ref": "../../core/v1.1.0/confirm.json#"
},
{
"$ref": "https://beckn.org/schema/confirm#"
},
{
"$ref": "./init.json#/allOf/2"
"$ref": "./init.json#/allOf/1"
}
]
}

View File

@@ -7,10 +7,7 @@
"$ref": "../../core/v1.1.0/confirm.json#"
},
{
"$ref": "https://beckn.org/schema/confirm#"
},
{
"$ref": "./init.json#/allOf/2"
"$ref": "./init.json#/allOf/1"
}
]
}

View File

@@ -7,10 +7,7 @@
"$ref": "../../core/v1.1.0/confirm.json#"
},
{
"$ref": "https://beckn.org/schema/confirm#"
},
{
"$ref": "./init.json#/allOf/2"
"$ref": "./init.json#/allOf/1"
}
]
}

View File

@@ -1,16 +1,13 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/on_update",
"$id": "on_update",
"type": "object",
"allOf": [
{
"$ref": "../core/v1.1.0/confirm.json#"
"$ref": "../../core/v1.1.0/confirm.json#"
},
{
"$ref": "https://beckn.org/schema/confirm#"
},
{
"$ref": "./init.json#/allOf/2"
"$ref": "./init.json#/allOf/1"
}
]
}

View File

@@ -7,10 +7,7 @@
"$ref": "../../core/v1.1.0/rating.json#"
},
{
"$ref": "https://beckn.org/schema/rating#"
},
{
"$ref": "./init.json#/allOf/2"
"$ref": "./init.json#/allOf/1"
}
]
}

View File

@@ -2,7 +2,7 @@
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "search",
"allOf": [
{ "$ref": "../core/v1.1.0/search.json#" }
{ "$ref": "../../core/v1.1.0/search.json#" }
],
"type": "object",
"properties": {
@@ -38,12 +38,10 @@
"required": ["city", "country"]
},
"bap_id": {
"type": "string",
"pattern": "^(http|https).*"
"type": "string"
},
"bpp_id": {
"type": "string",
"pattern": "^(http|https).*"
"type": "string"
},
"ttl": {
"type": "string",

View File

@@ -3,9 +3,14 @@
"$id": "select",
"type": "object",
"allOf": [
{ "$ref": "../core/v1.1.0/select.json#" },
{ "$ref": "https://beckn.org/schema/select#" },
{ "$ref": "./init.json#/$defs/init_schema_1" },
{ "$ref": "../paths/init.json#/$defs/init_schema_2" }
{
"$ref": "../../core/v1.1.0/select.json#"
},
{
"$ref": "./init.json#/allOf/1"
},
{
"$ref": "./init.json#/allOf/2"
}
]
}
}

View File

@@ -7,10 +7,7 @@
"$ref": "../../core/v1.1.0/status.json#"
},
{
"$ref": "https://beckn.org/schema/status#"
},
{
"$ref": "./init.json#/allOf/2"
"$ref": "./init.json#/allOf/1"
},
{
"properties": {

View File

@@ -7,10 +7,7 @@
"$ref": "../../core/v1.1.0/support.json#"
},
{
"$ref": "https://beckn.org/schema/support#"
},
{
"$ref": "./init.json#/allOf/2"
"$ref": "./init.json#/allOf/1"
}
]
}

View File

@@ -7,10 +7,7 @@
"$ref": "../../core/v1.1.0/track.json#"
},
{
"$ref": "https://beckn.org/schema/track#"
},
{
"$ref": "./init.json#/allOf/2"
"$ref": "./init.json#/allOf/1"
}
]
}

View File

@@ -7,10 +7,7 @@
"$ref": "../../core/v1.1.0/update.json#"
},
{
"$ref": "https://beckn.org/schema/update#"
},
{
"$ref": "./init.json#/allOf/2"
"$ref": "./init.json#/allOf/1"
},
{
"properties": {