Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sync] Validate json blob before posting it to syncAPI #1253

Open
1 task
aaperis opened this issue Jan 10, 2025 · 0 comments
Open
1 task

[sync] Validate json blob before posting it to syncAPI #1253

aaperis opened this issue Jan 10, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@aaperis
Copy link
Contributor

aaperis commented Jan 10, 2025

Describe the bug

In order to avoid errors on the syncAPI like this one:

time="2024-12-12T12:32:46Z" level=info msg="map[error:eror on JSON validation: [I#] [S#] doesn't validate with https://github.com/neicnordic/sensitive-data-archive/tree/master/sda/schemas/bigpicture/file-sync.json#\n  [I#/dataset_files] [S#/properties/dataset_files/type] expected array, but got null\n  [I#/user] [S#/properties/user/minLength] length must be >= 5, but got 0]"

it would be good to add the json validation step also on the sync side.

Steps to reproduce

Expected behavior

  • Tests verifying the fix are added

Additional context

Estimation of size

small/medium/big

Estimation of priority

low/medium/high

@aaperis aaperis added the bug Something isn't working label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant