add new schemas

This commit is contained in:
AshwiniK-protean
2025-02-27 10:23:49 +05:30
parent 87d546ea8a
commit 113aadbb0a
65 changed files with 7578 additions and 151 deletions

View File

View File

@@ -0,0 +1,43 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/init",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"init"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order": {
"$ref": "../schema/components.json#/$defs/Order"
}
},
"required": [
"order"
]
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,43 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://beckn.org/schema/OnCancel",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"properties": {
"action": {
"enum": [
"on_cancel"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"properties": {
"order": {
"$ref": "../schema/components.json#/$defs/Order"
}
},
"required": [
"order"
]
},
"error": {
"$ref": "../schema/components.json#/$defs/Error"
}
},
"required": [
"context"
]
}

View File

@@ -0,0 +1,43 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://beckn.org/schema/OnConfirm",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"properties": {
"action": {
"enum": [
"on_confirm"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"properties": {
"order": {
"$ref": "../schema/components.json#/$defs/Order"
}
},
"required": [
"order"
]
},
"error": {
"$ref": "../schema/components.json#/$defs/Error"
}
},
"required": [
"context"
]
}

View File

@@ -0,0 +1,43 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://beckn.org/schema/OnInit",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"properties": {
"action": {
"enum": [
"on_init"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"properties": {
"order": {
"$ref": "../schema/components.json#/$defs/Order"
}
},
"required": [
"order"
]
},
"error": {
"$ref": "../schema/components.json#/$defs/Error"
}
},
"required": [
"context"
]
}

View File

@@ -0,0 +1,46 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://beckn.org/schema/OnRating",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"properties": {
"action": {
"enum": [
"on_rating"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"properties": {
"feedback_form": {
"description": "A feedback form to allow the user to provide additional information on the rating provided",
"allOf": [
{
"$ref": "../schema/components.json#/$defs/XInput"
}
]
}
}
},
"error": {
"$ref": "../schema/components.json#/$defs/Error"
}
},
"required": [
"context",
"message"
]
}

View File

@@ -0,0 +1,43 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://beckn.org/schema/OnSearch",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"properties": {
"action": {
"enum": [
"on_search"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"properties": {
"catalog": {
"$ref": "../schema/components.json#/$defs/Catalog"
}
},
"required": [
"catalog"
]
},
"error": {
"$ref": "../schema/components.json#/$defs/Error"
}
},
"required": [
"context"
]
}

View File

@@ -0,0 +1,40 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://beckn.org/schema/OnSelect",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"properties": {
"action": {
"enum": [
"on_select"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"properties": {
"order": {
"$ref": "../schema/components.json#/$defs/Order"
}
}
},
"error": {
"$ref": "../schema/components.json#/$defs/Error"
}
},
"required": [
"context"
]
}

View File

@@ -0,0 +1,43 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://beckn.org/schema/OnStatus",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"properties": {
"action": {
"enum": [
"on_status"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"properties": {
"order": {
"$ref": "../schema/components.json#/$defs/Order"
}
},
"required": [
"order"
]
},
"error": {
"$ref": "../schema/components.json#/$defs/Error"
}
},
"required": [
"context"
]
}

View File

@@ -0,0 +1,40 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://beckn.org/schema/OnSupport",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"properties": {
"action": {
"enum": [
"on_support"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"properties": {
"support": {
"$ref": "../schema/components.json#/$defs/Support"
}
}
},
"error": {
"$ref": "../schema/components.json#/$defs/Error"
}
},
"required": [
"context"
]
}

View File

@@ -0,0 +1,43 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://beckn.org/schema/OnTrack",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"properties": {
"action": {
"enum": [
"on_track"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"properties": {
"tracking": {
"$ref": "../schema/components.json#/$defs/Tracking"
}
},
"required": [
"tracking"
]
},
"error": {
"$ref": "../schema/components.json#/$defs/Error"
}
},
"required": [
"context"
]
}

View File

@@ -0,0 +1,43 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://beckn.org/schema/OnUpdate",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"properties": {
"action": {
"enum": [
"on_update"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"properties": {
"order": {
"$ref": "../schema/components.json#/$defs/Order"
}
},
"required": [
"order"
]
},
"error": {
"$ref": "../schema/components.json#/$defs/Error"
}
},
"required": [
"context"
]
}

View File

@@ -0,0 +1,42 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/rating",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"rating"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"properties": {
"ratings": {
"type": "array",
"items": {
"$ref": "../schema/components.json#/$defs/Rating"
}
}
}
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://beckn.org/schema/Response",
"type": "object",
"properties": {},
"required": []
}

View File

@@ -0,0 +1,43 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/status",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"status"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"ref_id": {
"$ref": "../schema/components.json#/$defs/Order"
},
"order_id": {
"$ref": "../schema/components.json#/$defs/Order"
}
}
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,39 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/support",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"support"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"properties": {
"support": {
"$ref": "../schema/components.json#/$defs/Support"
}
}
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,47 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/track",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"track"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order_id": {
"$ref": "../schema/components.json#/$defs/Order"
},
"callback_url": {
"type": "string",
"format": "uri"
}
},
"required": [
"order_id"
]
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,53 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/update",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"update"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"update_target": {
"description": "Comma separated values of order objects being updated. For example: ```\"update_target\":\"item,billing,fulfillment\"```",
"type": "string"
},
"order": {
"description": "Updated order object",
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Order"
}
]
}
},
"required": [
"update_target",
"order"
]
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,49 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/cancel",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"cancel"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order_id": {
"$ref": "../schema/components.json#/$defs/Order"
},
"cancellation_reason_id": {
"$ref": "../schema/components.json#/$defs/Option"
},
"descriptor": {
"$ref": "../schema/components.json#/$defs/Descriptor"
}
},
"required": [
"order_id"
]
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,43 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/confirm",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"confirm"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order": {
"$ref": "../schema/components.json#/$defs/Order"
}
},
"required": [
"order"
]
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,46 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/on_cancel",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"on_cancel"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order": {
"$ref": "../schema/components.json#/$defs/Order"
}
},
"required": [
"order"
]
},
"error": {
"$ref": "../schema/components.json#/$defs/Error"
}
},
"required": [
"context",
"message"
]
}

View File

@@ -0,0 +1,46 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/on_confirm",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"on_confirm"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order": {
"$ref": "../schema/components.json#/$defs/Order"
}
},
"required": [
"order"
]
},
"error": {
"$ref": "../schema/components.json#/$defs/Error"
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,46 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/on_init",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"on_init"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order": {
"$ref": "../schema/components.json#/$defs/Order"
}
},
"required": [
"order"
]
},
"error": {
"$ref": "../schema/components.json#/$defs/Error"
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,47 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/on_rating",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"on_rating"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"properties": {
"feedback_form": {
"description": "A feedback form to allow the user to provide additional information on the rating provided",
"allOf": [
{
"$ref": "../schema/components.json#/$defs/XInput"
}
]
}
}
},
"error": {
"$ref": "../schema/components.json#/$defs/Error"
}
},
"required": [
"context",
"message"
]
}

View File

@@ -0,0 +1,46 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/on_search",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"on_search"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"catalog": {
"$ref": "../schema/components.json#/$defs/Catalog"
}
},
"required": [
"catalog"
]
},
"error": {
"$ref": "../schema/components.json#/$defs/Error"
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,43 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/on_select",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"on_select"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order": {
"$ref": "../schema/components.json#/$defs/Order"
}
}
},
"error": {
"$ref": "../schema/components.json#/$defs/Error"
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,46 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/on_status",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"on_status"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order": {
"$ref": "../schema/components.json#/$defs/Order"
}
},
"required": [
"order"
]
},
"error": {
"$ref": "../schema/components.json#/$defs/Error"
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,42 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/on_support",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"on_support"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"properties": {
"support": {
"$ref": "../schema/components.json#/$defs/Support"
}
}
},
"error": {
"$ref": "../schema/components.json#/$defs/Error"
}
},
"required": [
"context",
"message"
]
}

View File

@@ -0,0 +1,46 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/on_track",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"on_track"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"tracking": {
"$ref": "../schema/components.json#/$defs/Tracking"
}
},
"required": [
"tracking"
]
},
"error": {
"$ref": "../schema/components.json#/$defs/Error"
}
},
"required": [
"context",
"message"
]
}

View File

@@ -0,0 +1,46 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/on_update",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"on_update"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order": {
"$ref": "../schema/components.json#/$defs/Order"
}
},
"required": [
"order"
]
},
"error": {
"$ref": "../schema/components.json#/$defs/Error"
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,26 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/search",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
}
]
},
"message": {
"properties": {
"intent": {
"$ref": "../schema/components.json#/$defs/Intent"
}
},
"type": "object"
}
},
"required": [
"message",
"context"
]
}

View File

@@ -0,0 +1,43 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ondc.org/trv10/2.0.0/select",
"type": "object",
"properties": {
"context": {
"allOf": [
{
"$ref": "../schema/components.json#/$defs/Context"
},
{
"type": "object",
"properties": {
"action": {
"enum": [
"select"
]
}
},
"required": [
"action"
]
}
]
},
"message": {
"type": "object",
"additionalProperties": false,
"properties": {
"order": {
"$ref": "../schema/components.json#/$defs/Order"
}
},
"required": [
"order"
]
}
},
"required": [
"message",
"context"
]
}

File diff suppressed because it is too large Load Diff