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.
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.