Correct pattern returns a false positive
This pattern return error: (@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every (\d+(ns|us|µs|ms|s|m|h))+)|((((\d+,)+\d+|(\d+(\/|-)\d+)|\d+|\*) ?){5,7})
But is valid https://regex101.com/r/ZLzqnq/1
using a json schema validator such as https://json-schema.hyperjump.io/ it mentionned as well that is is not a correct pattern same for https://json-everything.net/json-schema/ there should be something wrong about ecaping char
My bad. Sorry, legacy code. It brings out the worst in me.
{
"openapi": "3.0.3",
"components": {
"schemas": {
"foo": {
"type": "object",
"properties": {
"foo": {
"default": "*/15 * * * *",
"pattern": "(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every ([0-9]+(ns|us|\u00b5s|ms|s|m|h))+)|(((([0-9]+,)+[0-9]+|([0-9]+(/|-)[0-9]+)|[0-9]+|\\*) ?){5,7})",
"title": "foo",
"type": "string"
}
}
}
}
}
}
@LasneF That's fails but is valid in the previous validators
{ "openapi": "3.0.3", "components": { "schemas": { "foo": { "type": "object", "properties": { "foo": { "default": "*/15 * * * ", "pattern": "(@(annually|yearly|monthly|weekly|daily|hourly|reboot))|(@every ([0-9]+(ns|us|\u00b5s|ms|s|m|h))+)|(((([0-9]+,)+[0-9]+|([0-9]+(/|-)[0-9]+)|[0-9]+|\) ?){5,7})", "title": "foo", "type": "string" } } } } } } @LasneF That's fails but is valid in the previous validators
Which previous validators? earlier versions of vacuum? or something else?
Version 0.16.4
Test with: https://json-schema.hyperjump.io/ https://json-everything.net/json-schema/ https://github.com/OpenAPITools/openapi-generator
oas-schema-check error
Also, in the report, the file:line_number is bad, is in main file and the error is in schemas file, and a line number outside the file.
Path is correct in the report.
I'll add this to the list of investigations required
This was fixed in v0.16.6