![](/img/trans.png)
[英]How to restrict HATEOAS navigation links based on WebAPI permissions?
[英]Adding HATEOAS links to response
我正在努力在响应中包含仇恨链接。 具体来说,对于kitIncludes字段。 我想要每个记录都有一个链接。 例如,产品/杰森组件
我在哪里可以找到此链接? 它是kitIncludes字段中的一个字段吗? 还是应该在淘汰字段下的链接中?
{
"links": [
{
"rel": "self",
"href": "http://localhost:60778/v2/products?page=0&limit=100"
},
{
"rel": "first",
"href": "http://localhost:60778/v2/products?page=0&limit=100"
},
{
"rel": "last",
"href": "http://localhost:60778/v2/products?page=0&limit=100"
}
],
"metadata": {
"totalRecords": 1
},
"entities": [
{
"additionalDimensions": null,
"assemblyInstructionsUrl": null,
"detailedDescription": null,
"dimensionSketch": null,
"kitIncludes": [
{
"sku": "jason-component",
"quantity": 12
}
],
"fobBasePrice": 0,
"friendlyDescription": null,
"itemsPerCase": 1,
"itemType": "Kit",
"itemWeightKg": 0,
"itemWeightLbs": 0,
"knockout": null,
"links": [
{
"rel": "self",
"href": "/products/JASON-KIT"
},
{
"rel": "series",
"href": "/series/"
}
],
"manufacturerWarrantyDays": 0,
"mechanismGuideUrl": null,
"partsDrawingUrl": null,
"productDetails": null,
"productVideo": null,
"upc": null,
"vendorName": "Test"
}
]
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.