mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
27 lines
541 B
JavaScript
27 lines
541 B
JavaScript
import Ajv from 'ajv';
|
|
|
|
let thing = {
|
|
type: 'string',
|
|
pattern: '(a?a?)*b' // NOT OK
|
|
}
|
|
new Ajv().addSchema(thing, 'thing');
|
|
|
|
export default {
|
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
type: "object",
|
|
properties: {
|
|
foo: {
|
|
type: "string",
|
|
pattern: "(a?a?)*b" // NOT OK
|
|
},
|
|
bar: {
|
|
type: "object",
|
|
patternProperties: {
|
|
"(a?a?)*b": { // NOT OK
|
|
type: "number"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|