hyperledger / firefly

Hyperledger FireFly is the first open source Supernode: a complete stack for enterprises to build and scale secure Web3 applications. The FireFly API for digital assets, data flows, and blockchain transactions makes it radically faster to build production-ready apps on popular chains and protocols.
https://hyperledger.github.io/firefly
Apache License 2.0
507 stars 208 forks source link

chore: Remove getIdentityByDID route #1558

Closed dwertent closed 3 months ago

dwertent commented 3 months ago

Overview

Swagger Documentation Issue

The problem occurred when rendering the Swagger documentation. The code is designed to list API paths and generate documentation based on those paths. However, an issue arose in the way the Find function was used. This function is agnostic to the specific value of the API keys, which led to the swagger generator pulling in the wrong documentation.

Solution

I considered the following potential solutions:

  1. Implement a custom Find function that is aware of the API key value.
  2. Combine the API functions so that identities/{ID} can accept either a UUID or a DID.

I chose the second solution for the following reasons:

  1. A different organization maintains the Find function, and it may take time to implement a custom version.
  2. Since the API paths for handling DID and UUID are the same, it's logical to use a single function to handle both types of requests.

Side Note

I recommend deprecating DID support in favor of using UUIDs exclusively. This would simplify our API by providing a single, consistent definition for ID, reducing potential confusion and complexity in future development.

This PR fixes #1528

dwertent commented 3 months ago

Summarizing your review:

  1. This PR should not break backward compatibility because iid/DID are not query params, mainly placeholders.
  2. I will revert unused code to the linter fixes I made.
EnriqueL8 commented 3 months ago

@dwertent build failing and e2e tests as well

EnriqueL8 commented 3 months ago

something wrong with the UUID verification restclient.go:118: <!! {"error":"FF00126: Unknown identity type: %!!(MISSING)s(MISSING)"}

dwertent commented 3 months ago

This PR is no longer needed as we've resolved the issue with a different approach. I will open a new PR to update the FireFly-common tag once it's published.