Created
June 22, 2021 12:57
-
-
Save abhinavlal/8cc25e7149e5ca1d51f112f3043e609e to your computer and use it in GitHub Desktop.
This file contains 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
{ | |
"$id": "http://example.com/example.json", | |
"$schema": "http://json-schema.org/draft-07/schema", | |
"default": {}, | |
"description": "Defines the component for showing a mini card for doctor pprofile", | |
"examples": [ | |
{ | |
"id": "myComponent", | |
"version": "v1", | |
"content": { | |
"title": "This is a title", | |
"subtitle": "This is a subtitle", | |
"img": "https://www.practo.com/logo.png" | |
}, | |
"events": { | |
"onView": { | |
"actor": 13234, | |
"object": "doctor", | |
"action": "viewed", | |
"displayType": "mini-card" | |
}, | |
"onPress": { | |
"actor": 13234, | |
"object": "doctor", | |
"action": "interacted", | |
"displayType": "mini-card" | |
} | |
}, | |
"actions": { | |
"onPress": { | |
"case": "deeplink", | |
"data": { | |
"url": "practo.com/doctor-profile" | |
} | |
} | |
} | |
} | |
], | |
"required": [ | |
"id", | |
"version", | |
"content" | |
], | |
"title": "doctorMiniCardComponent", | |
"type": "object", | |
"properties": { | |
"id": { | |
"$id": "#/properties/id", | |
"type": "string", | |
"title": "The id schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": "", | |
"examples": [ | |
"myComponent" | |
] | |
}, | |
"version": { | |
"$id": "#/properties/version", | |
"type": "string", | |
"title": "The version schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": "", | |
"examples": [ | |
"v1" | |
] | |
}, | |
"content": { | |
"$id": "#/properties/content", | |
"default": {}, | |
"description": "Defines the content of doctor", | |
"examples": [ | |
{ | |
"title": "This is a title", | |
"subtitle": "This is a subtitle", | |
"img": "https://www.practo.com/logo.png" | |
} | |
], | |
"minProperties": 1, | |
"required": [ | |
"title" | |
], | |
"title": "The content schema", | |
"uniqueItems": true, | |
"type": "object", | |
"properties": { | |
"title": { | |
"$id": "#/properties/content/properties/title", | |
"default": "", | |
"description": "An explanation about the purpose of this instance.", | |
"examples": [ | |
"This is a title" | |
], | |
"title": "The title schema", | |
"type": "string" | |
}, | |
"subtitle": { | |
"$id": "#/properties/content/properties/subtitle", | |
"type": "string", | |
"title": "The subtitle schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": "", | |
"examples": [ | |
"This is a subtitle" | |
] | |
}, | |
"img": { | |
"$id": "#/properties/content/properties/img", | |
"type": "string", | |
"title": "The img schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": "", | |
"examples": [ | |
"https://www.practo.com/logo.png" | |
] | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"events": { | |
"$id": "#/properties/events", | |
"type": "object", | |
"title": "The events schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": {}, | |
"examples": [ | |
{ | |
"onView": { | |
"actor": 13234, | |
"object": "doctor", | |
"action": "viewed", | |
"displayType": "mini-card" | |
}, | |
"onPress": { | |
"actor": 13234, | |
"object": "doctor", | |
"action": "interacted", | |
"displayType": "mini-card" | |
} | |
} | |
], | |
"required": [ | |
"onView", | |
"onPress" | |
], | |
"properties": { | |
"onView": { | |
"$id": "#/properties/events/properties/onView", | |
"type": "object", | |
"title": "The onView schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": {}, | |
"examples": [ | |
{ | |
"actor": 13234, | |
"object": "doctor", | |
"action": "viewed", | |
"displayType": "mini-card" | |
} | |
], | |
"required": [ | |
"actor", | |
"object", | |
"action", | |
"displayType" | |
], | |
"properties": { | |
"actor": { | |
"$id": "#/properties/events/properties/onView/properties/actor", | |
"type": "integer", | |
"title": "The actor schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": 0, | |
"examples": [ | |
13234 | |
] | |
}, | |
"object": { | |
"$id": "#/properties/events/properties/onView/properties/object", | |
"type": "string", | |
"title": "The object schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": "", | |
"examples": [ | |
"doctor" | |
] | |
}, | |
"action": { | |
"$id": "#/properties/events/properties/onView/properties/action", | |
"type": "string", | |
"title": "The action schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": "", | |
"examples": [ | |
"viewed" | |
] | |
}, | |
"displayType": { | |
"$id": "#/properties/events/properties/onView/properties/displayType", | |
"type": "string", | |
"title": "The displayType schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": "", | |
"examples": [ | |
"mini-card" | |
] | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"onPress": { | |
"$id": "#/properties/events/properties/onPress", | |
"type": "object", | |
"title": "The onPress schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": {}, | |
"examples": [ | |
{ | |
"actor": 13234, | |
"object": "doctor", | |
"action": "interacted", | |
"displayType": "mini-card" | |
} | |
], | |
"required": [ | |
"actor", | |
"object", | |
"action", | |
"displayType" | |
], | |
"properties": { | |
"actor": { | |
"$id": "#/properties/events/properties/onPress/properties/actor", | |
"type": "integer", | |
"title": "The actor schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": 0, | |
"examples": [ | |
13234 | |
] | |
}, | |
"object": { | |
"$id": "#/properties/events/properties/onPress/properties/object", | |
"type": "string", | |
"title": "The object schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": "", | |
"examples": [ | |
"doctor" | |
] | |
}, | |
"action": { | |
"$id": "#/properties/events/properties/onPress/properties/action", | |
"type": "string", | |
"title": "The action schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": "", | |
"examples": [ | |
"interacted" | |
] | |
}, | |
"displayType": { | |
"$id": "#/properties/events/properties/onPress/properties/displayType", | |
"type": "string", | |
"title": "The displayType schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": "", | |
"examples": [ | |
"mini-card" | |
] | |
} | |
}, | |
"additionalProperties": true | |
} | |
}, | |
"additionalProperties": true | |
}, | |
"actions": { | |
"$id": "#/properties/actions", | |
"type": "object", | |
"title": "The actions schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": {}, | |
"examples": [ | |
{ | |
"onPress": { | |
"case": "deeplink", | |
"data": { | |
"url": "practo.com/doctor-profile" | |
} | |
} | |
} | |
], | |
"required": [ | |
"onPress" | |
], | |
"properties": { | |
"onPress": { | |
"$id": "#/properties/actions/properties/onPress", | |
"type": "object", | |
"title": "The onPress schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": {}, | |
"examples": [ | |
{ | |
"case": "deeplink", | |
"data": { | |
"url": "practo.com/doctor-profile" | |
} | |
} | |
], | |
"required": [ | |
"case", | |
"data" | |
], | |
"properties": { | |
"case": { | |
"$id": "#/properties/actions/properties/onPress/properties/case", | |
"type": "string", | |
"title": "The case schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": "", | |
"examples": [ | |
"deeplink" | |
] | |
}, | |
"data": { | |
"$id": "#/properties/actions/properties/onPress/properties/data", | |
"type": "object", | |
"title": "The data schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": {}, | |
"examples": [ | |
{ | |
"url": "practo.com/doctor-profile" | |
} | |
], | |
"required": [ | |
"url" | |
], | |
"properties": { | |
"url": { | |
"$id": "#/properties/actions/properties/onPress/properties/data/properties/url", | |
"type": "string", | |
"title": "The url schema", | |
"description": "An explanation about the purpose of this instance.", | |
"default": "", | |
"examples": [ | |
"practo.com/doctor-profile" | |
] | |
} | |
}, | |
"additionalProperties": true | |
} | |
}, | |
"additionalProperties": true | |
} | |
}, | |
"additionalProperties": true | |
} | |
}, | |
"additionalProperties": true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment