Below is the complete metadata file for the example demonstrated in the previous sections.
{
"endpoints": {
"ExamplesGetSingleProduct": {
"businessLogic": {
"allProductsRetrieval": {
"executionType": "processFlow",
"processFlowProperties": {
"processFlowName": "Example Get Product Catalog",
"processFlowParameters": {
"ProductId": "@Request.ProductId"
}
}
}
},
"route": {
"httpMethod": "GET",
"segments": {
"examples": {
"isLiteral": true,
"type": "string"
},
"products": {
"isLiteral": true,
"type": "string"
},
"productId": {
"isLiteral": false,
"type": "long"
}
}
},
"outputEntityDefinition": {
"name": "ExampleProductOutput",
"fields": {
"id": {
"type": "long"
},
"name": {
"type": "string"
},
"description": {
"type": "string",
"description": "A plain text description of the product."
},
"hasComplexPricing": {
"type": "boolean",
"description": "If true, this indicates you must add the product to the cart in order to get an accurate price."
},
"defaultPrice": {
"type": "decimal"
}
}
},
"inputEntityDefinition": {
"name": "ExampleGetSingleProductInput",
"fields": {
"productId": {
"type": "long",
"input": {
"httpMethods": [
"GET"
],
"source": "path"
}
}
}
},
"security": {
"AllowAnonymous": {
"type": "AllowAnonymous"
}
}
}
}
}
Comments
Please sign in to leave a comment.