Fix invalid JSON schema definition (v1)
What does this MR do and why?
As per #351777 (closed), we are having a lot of invalid JSON schemas, and the tests are giving false positive.
How to set up and validate locally
- Execute the following script in the console
require "json"
require "json_schemer"
require "open-uri"
validator = JSON.parse(open("https://json-schema.org/draft-07/schema").read)
schema_validator = JSONSchemer.schema(validator)
valid, invalid = Dir.glob("{,ee/}spec/**/*.json").grep(/schema/).partition { |schema| schema_validator.valid?(JSON.parse(File.read(schema))) }
p valid: valid.size, invalid: invalid.size
- Validate the number of invalid schemas went down
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Bojan Marjanovic