WebOfTrust / keria

KERI Agent in the cloud
https://keria.readthedocs.io/en/latest/
Apache License 2.0
16 stars 26 forks source link

IdentifierResourceEnd: rename alias, events, and delete aid #218

Closed rodolfomiranda closed 3 months ago

rodolfomiranda commented 3 months ago

This PR modify the IdentifierResourceEnd endpoint in the following way:

related to this issue #216 , and Discord this discussion:

rodolfomiranda commented 3 months ago

still working on tests

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 91.66667% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 93.07%. Comparing base (c38a54b) to head (0cdcc49). Report is 1 commits behind head on development.

Files Patch % Lines
src/keria/app/aiding.py 84.84% 5 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## development #218 +/- ## =============================================== - Coverage 93.14% 93.07% -0.08% =============================================== Files 38 38 Lines 6943 6986 +43 =============================================== + Hits 6467 6502 +35 - Misses 476 484 +8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

lenkan commented 3 months ago

Cross posting from signify-ts: https://github.com/WebOfTrust/signify-ts/pull/241#pullrequestreview-1978910667

Open question... since we are changing the API anyways. Is there currently any benefit of using the event type as an object field key rather than just relying on the event payload t property? I'll illustrate with an example what I mean:

Currently:

POST /identifiers/name/events
{
  "rot": { ...rot payload },
  "sigs": [...sigs]
}

POST /identifiers/name/events
{
  "ixn": { ...ixn payload },
  "sigs": [...sigs]
}

Rather than:

POST /identifiers/name/events
{
  "event": { t: "rot/ixn", ...rot/ixn payload },
  "sigs": [...sigs]
}

The switch on backend would be to check body.event.t === "ixn" or body.event.t === "rot".