avniproject / avniproject/avni-server
Implementer Friendliness for Avni [DMP 2024]
- Dominant language
- Java
- Stars
- 22
- Forks
- 47
- PR merge metrics
- No merged PRs in 30d
Description
**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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the MetadataDiffService and MetadataDiffController entry points, then exercise /compare-metadata with two uploaded ZIP files containing nested JSON metadata. Done means the endpoint returns structured added, modified, and removed differences, with the filename appearing only at the top level.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100