Skip to content

Instantly share code, notes, and snippets.

@saranyan
Created December 7, 2011 23:00
Show Gist options
  • Save saranyan/1445171 to your computer and use it in GitHub Desktop.
Save saranyan/1445171 to your computer and use it in GitHub Desktop.
Catalog avpr file
{
"protocol" : "CatalogService",
"namespace" : "com.x.service.catalog",
"types" : [ {
"type" : "record",
"name" : "GetProductTypesMessage",
"fields" : [ {
"name" : "locale",
"type" : [ "null", "string" ]
} ],
"topic" : "/productType/find"
}, {
"type" : "record",
"name" : "ProductType",
"fields" : [ {
"name" : "productTypeId",
"type" : "string"
}, {
"name" : "producTypeName",
"type" : "string"
}, {
"name" : "categorization",
"type" : "string"
}, {
"name" : "description",
"type" : "string"
} ]
}, {
"type" : "record",
"name" : "ProductTypesMessage",
"fields" : [ {
"name" : "timeStamp",
"type" : "string"
}, {
"name" : "locale",
"type" : [ "null", "string" ]
}, {
"name" : "ProductTypes",
"type" : {
"type" : "array",
"items" : "ProductType"
}
} ],
"topic" : "/productType/find/success"
}, {
"type" : "record",
"name" : "GetProductTypesErrorMessage",
"fields" : [ {
"name" : "timeStamp",
"type" : "string"
}, {
"name" : "locale",
"type" : [ "null", "string" ]
}, {
"name" : "errorCode",
"type" : "int"
}, {
"name" : "errorMessage",
"type" : "string"
} ],
"topic" : "/productType/find/fail"
}, {
"type" : "record",
"name" : "GetProductTypeMetadataMessage",
"fields" : [ {
"name" : "productTypeId",
"type" : "string"
} ],
"topic" : "/productType/attributeMetadata/get"
}, {
"type" : "enum",
"name" : "AttributeDataType",
"symbols" : [ "NUMERIC", "CURRENCY", "STRING", "BOOLEAN", "DATE" ]
}, {
"type" : "record",
"name" : "Token",
"fields" : [ {
"name" : "restricted",
"type" : "boolean"
}, {
"name" : "predefinedValues",
"type" : {
"type" : "array",
"items" : "string"
}
} ]
}, {
"type" : "record",
"name" : "NumericTypeDetails",
"fields" : [ {
"name" : "maxValueAllowed",
"type" : [ "null", "int" ]
}, {
"name" : "unitOfMeasure",
"type" : [ "null", "Token" ]
} ]
}, {
"type" : "record",
"name" : "StringTypeDetails",
"fields" : [ {
"name" : "regularExpression",
"type" : [ "null", "string" ]
}, {
"name" : "descriptionOfRestriction",
"type" : [ "null", "string" ]
}, {
"name" : "predefinedValues",
"type" : [ "null", "Token" ]
}, {
"name" : "allowMultiValue",
"type" : "boolean"
} ]
}, {
"type" : "record",
"name" : "TypeSpecificDetails",
"fields" : [ {
"name" : "numericTypeDetails",
"type" : [ "null", "NumericTypeDetails" ]
}, {
"name" : "stringTypeDetails",
"type" : [ "null", "StringTypeDetails" ]
} ]
}, {
"type" : "record",
"name" : "AttributeMetadata",
"fields" : [ {
"name" : "attributeName",
"type" : "string"
}, {
"name" : "attributeDataType",
"type" : "AttributeDataType"
}, {
"name" : "required",
"type" : "boolean"
}, {
"name" : "typeSpecificDetails",
"type" : [ "null", "TypeSpecificDetails" ]
}, {
"name" : "attributeDescription",
"type" : [ "null", "string" ]
} ]
}, {
"type" : "record",
"name" : "ProductTypeMetadataMessage",
"fields" : [ {
"name" : "timeStamp",
"type" : "string"
}, {
"name" : "productTypeId",
"type" : "string"
}, {
"name" : "attributeMetadata",
"type" : {
"type" : "array",
"items" : "AttributeMetadata"
}
} ],
"topic" : "/productType/attributeMetadata/get/success"
}, {
"type" : "record",
"name" : "GetProductTypeMetadataErrorMessage",
"fields" : [ {
"name" : "timeStamp",
"type" : "string"
}, {
"name" : "productTypeId",
"type" : "string"
}, {
"name" : "errorCode",
"type" : "int"
}, {
"name" : "errorMessage",
"type" : "string"
} ],
"topic" : "/productType/attributeMetadata/get/fail"
} ],
"messages" : {
"getProductTypes" : {
"request" : [ {
"name" : "message",
"type" : "GetProductTypesMessage"
} ],
"response" : "ProductTypesMessage"
},
"getProductTypeMetadata" : {
"request" : [ {
"name" : "message",
"type" : "GetProductTypeMetadataMessage"
} ],
"response" : "ProductTypeMetadataMessage"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment