Correct and clean up xray_report payload schema & factory
What does this MR do and why?
In #479185 (closed), we updated the Projects::XrayReport model's payload JSON schema. There was a small typo in the issue which said to use file_path, but it was supposed to be the plural file_paths. This is because when we save the report in Ai::RepositoryXray::ScanDependenciesService, we merge multiple payloads and combine the file paths into a string array.
This MR:
- Updates the Xray payload JSON schema with
file_pathsand defines it as a string array.-
NOTE: This does not affect any existing code/behaviour because:
- (a) we currently don't make use of the
file_pathsvalue anywhere, and - (b) the JSON schema is not and has never been restrictive so far (i.e. no
requiredfields), so it won't throw validation errors.
- (a) we currently don't make use of the
-
NOTE: This does not affect any existing code/behaviour because:
- Updates the
xray_reportsfactory and related specs to more accurately reflect actual values saved to the database.
References
- Related to issue: Update `XrayReport` model JSON schema & remove ... (#479185 - closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Leaminn Ma