avniproject / avni-server

Backend APIs for Avni
https://avniproject.org
GNU Affero General Public License v3.0
6 stars 25 forks source link

Implementer Friendliness for Avni [DMP 2024] #754

Open shraddha761 opened 2 months ago

shraddha761 commented 2 months ago

Describe the bug Implemented a feature that compares JSON files within ZIP archives, focusing on identifying differences such as modifications, additions, and removals. The feature processes JSON files, even those within nested directories, and outputs a structured comparison report.

Steps to Reproduce Implement the MetadataDiffService class to handle the extraction and comparison of JSON files from ZIP archives. Set up the MetadataDiffController to expose an endpoint /compare-metadata for comparing two uploaded ZIP files. Upload two ZIP files containing JSON metadata via the /compare-metadata endpoint. Trigger the comparison process and observe the JSON difference output.

Expected Behavior The service should accurately compare the JSON files within the ZIP archives, outputting differences in a structured format that includes:

added: New fields or objects. modified: Existing fields or objects that have changed. removed: Fields or objects that were deleted. The filename should only appear at the top level.

https://github.com/avniproject/avni-product/issues/1536.

vinayvenu commented 2 months ago

@shraddha761 this is good as a stub, but please provide more detail so it is clear what the intention of this work is.