SciCatProject / SciCatProject/backend

OrigDatablocks not returned in dataset public v4

Open
#2,512 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Discussion needed
Dominant language
TypeScript
Stars
27
Forks
37
Avg merge
17h 32m
Merged PRs (30d)
38

Description

Summary

When submitting a GET request to /api/v4/dataset/public/<pid> that includes all of the linked information, it returns the dataset output DTO schema without the origdatablock included.
When viewing the same dataset in the FE as anonymous user, the files list is populated.

Steps to Reproduce

Submit a request similar to the following to your test environment:
curl -X 'GET' \ 'http://localhost:3000/api/v4/datasets/public?filter=%7B%0A%20%20%22limits%22%3A%20%7B%0A%20%20%20%20%22limit%22%3A%202%0A%20%20%7D%0A%7D' \ -H 'accept: application/json'

Copy the pid of the first public dataset shown and submit a request for the specific dataset specifying include all option.

Image

The dataset output dto returned is not fully populated with the origdatablock

Current Behaviour

Currently, it appears that the GET dataset/public/<pid> does not return the origdatablocks associated with the dataset

Expected Behaviour

When requesting a dataset through a GET dataset/public/<pid> with the include all option, it should return a fully populated dataset output dto that include the origdatablock

Details

Contributor guide

Open the contributing guide

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.

Research direction

Start by reproducing the documented curl request against the public dataset endpoint, then trace the GET /api/v4/datasets/public/ handling for the include all option. Compare its dataset output DTO with the anonymous frontend response. Done means the response includes the dataset's associated origdatablocks when include all is requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.