mitre-attack / mitre-attack/attack-workbench-rest-api
Extract collection bundle validation code into a callable function
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 57
- Forks
- 18
- Avg merge
- 6m
- Merged PRs (30d)
- 2
Description
Currently there is a significant set of collection bundle validation code included directly in the collectionBundlesController.importBundles() function. This makes is difficult for other parts of the system to call collectionBundlesService.importBundles() without duplicating the validation code.
This issue is to extract that validation logic and move it to a function in the collectionBundlesService to facilitate other code calling the service's importBundle() function.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating collectionBundlesController.importBundles() and collectionBundlesService.importBundles()/importBundle(). Trace the collection bundle validation currently embedded in the controller and determine the service function's expected inputs and callers. Done means the validation is callable from collectionBundlesService and the controller no longer duplicates it, with existing behavior preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100