Skip to content

Instantly share code, notes, and snippets.

@dviedma
Last active November 22, 2021 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dviedma/1f97e489b3ba4cce1355b4205855b7fe to your computer and use it in GitHub Desktop.
Save dviedma/1f97e489b3ba4cce1355b4205855b7fe to your computer and use it in GitHub Desktop.
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "NI Compare Page API",
"description": "A sample response from the Experience API that will feed NI's Compare Page",
"type": "object",
"definitions": {
"productData": {
"type": "object",
"properties": {
"attribute": {
"type": "string"
},
"value": {
"type": "string"
},
},
"required": ["attribute", "value"]
},
"product": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kbmaxId": {
"type": "string"
},
"productName": {
"type": "string"
},
"shortDescription": {
"type": "string"
},
"longDescription": {
"type": "string"
},
"listPrice": {
"type": "string"
},
"unitPrice": {
"type": "string"
},
"formattedListPrice": {
"type": "string"
},
"formattedUnitPrice": {
"type": "string"
},
"image": {
"type": "string"
},
"productLevel": {
"type": "string"
},
"uriPath": {
"type": "string"
},
"productSpecs": {
"type": "string"
},
"attributes": {
"type": "array",
"description": "The different key/value pairs containing the product info",
"items": {
"$ref": "#/definitions/productData"
},
"default": []
},
"required": ["id", "productName", "shortDescription", "longDescription", "listPrice", "unitPrice", "formattedListPrice", "formattedUnitPrice", "image", "productLevel", "uriPath", "attributes"]
}
}
},
"properties": {
"compareIds": {
"description": "List of products to compare"
"type":"array",
"items":{
"$ref":"#/definitions/product"
}
},
"required": ["compareIds"]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment