hyperledger-bevel / bevel

An automation framework for rapidly and consistently deploying production-ready DLT platforms
https://hyperledger-bevel.readthedocs.io/en/latest/
Apache License 2.0
347 stars 720 forks source link

Quorum App API: Implement PUT /api/v1/product/{trackingID} #296

Closed sownak closed 4 years ago

sownak commented 4 years ago

Description

As a developer I want to use API to get update parameters of a product on Quorum network so that I can integrate with frontend. Accepts an id url parameter and a JSON body with the below format:

{
  "productName":"Dextrose",
  "health":"String",
  "misc": {"name":"Expensive Dextrose"},
  "trackingID": "0d15d7b8-caaa-468d-8b83-aae049b40f46",
  "counterparties": ["PartyB","PartyC","PartyD"]
}

and calls the UpdateProduct transaction with the supplied JSON.

It should return an HTTP 400 error if productName, health, or misc are not supplied. It should return any errors received from the Fabric SDK.

Otherwise it should return the id of the updated product in the below format:

"0d15d7b8-caaa-468d-8b83-aae049b40f46"

Acceptance Criteria

  1. Update should only happen when caller is the custodian
sownak commented 4 years ago

This issue is wontfix as Update Product is not implemented. This is so that the supplychain APIs are consistent across different platforms.