asset information (previously named meta) schema potential point of failure

Open
#183 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
typescript
Domain
api, backend

Research direction

Start by reviewing the API asset schema and the App code that reads information.proof.hash.information. Compare the documented minimum payload with the current validation and handling paths. The work is complete when the finalized schema, strict API validation, and missing-key corner case behavior are agreed and covered.

Written by the indexing model from the issue text.

Description

code

Concept

The App presumes the information.proof.hash.information in asset exists, but the current API doesn't enforce/guarantee it exists. It's possible to add an asset without information.proof.hash.information key with API. It would be better to handle this corner case.

The current minimum possible information retrieved from API is:

{
  "proof":
    {
      "hash": ""
    }
}

Reason/Hypothesis

It's a potential failure point if user upload unexpected data using the API

Suggested Implementation (if any)

The data schema need to be revised to make it reasonable for both the backend API and App. Strict validation and corner case handling should be implemented after the next version of data schema is finalized.

┆Issue is synchronized with this Asana task by Unito

Dominant language
TypeScript
Stars
26
Forks
7
Avg merge
2d 14h
Merged PRs (30d)
10

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from numbersprotocol/capture-cam

All issues in numbersprotocol/capture-cam

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.