@@ -18,8 +18,7 @@ module JsonSchema {
18
18
}
19
19
20
20
/** A data flow node that is used a JSON schema. */
21
- abstract class SchemaRoot extends DataFlow:: Node {
22
- }
21
+ abstract class SchemaRoot extends DataFlow:: Node { }
23
22
24
23
/** An object literal with a `$schema` property indicating it is the root of a JSON schema. */
25
24
private class SchemaNodeByTag extends SchemaRoot , DataFlow:: ObjectLiteralNode {
@@ -35,9 +34,7 @@ module JsonSchema {
35
34
or
36
35
result = getAPartOfJsonSchema ( t .continue ( ) ) .getAPropertySource ( )
37
36
or
38
- exists ( DataFlow:: TypeBackTracker t2 |
39
- result = getAPartOfJsonSchema ( t2 ) .backtrack ( t2 , t )
40
- )
37
+ exists ( DataFlow:: TypeBackTracker t2 | result = getAPartOfJsonSchema ( t2 ) .backtrack ( t2 , t ) )
41
38
}
42
39
43
40
/** Gets a data flow node that is part of a JSON schema. */
@@ -68,7 +65,7 @@ module JsonSchema {
68
65
}
69
66
70
67
/**
71
- * Gets an API node for a function produced by `new Ajv().compile()` or similar.
68
+ * Gets an API node for a function produced by `new Ajv().compile()` or similar.
72
69
*
73
70
* Note that this does not include the instance method `new Ajv().validate` as its
74
71
* signature is different.
@@ -83,9 +80,7 @@ module JsonSchema {
83
80
* Gets an API node that refers to an error produced by this Ajv instance.
84
81
*/
85
82
API:: Node getAValidationError ( ) {
86
- exists ( API:: Node base |
87
- base = [ ref ( ) , getAValidationFunction ( ) ]
88
- |
83
+ exists ( API:: Node base | base = [ ref ( ) , getAValidationFunction ( ) ] |
89
84
result = base .getMember ( "errors" )
90
85
or
91
86
result = base .getMember ( "errorsText" ) .getReturn ( )
@@ -122,7 +117,12 @@ module JsonSchema {
122
117
123
118
private class AjvSchemaNode extends SchemaRoot {
124
119
AjvSchemaNode ( ) {
125
- this = any ( Instance i ) .ref ( ) .getMember ( [ "addSchema" , "validate" , "compile" , "compileAsync" ] ) .getParameter ( 0 ) .getARhs ( )
120
+ this =
121
+ any ( Instance i )
122
+ .ref ( )
123
+ .getMember ( [ "addSchema" , "validate" , "compile" , "compileAsync" ] )
124
+ .getParameter ( 0 )
125
+ .getARhs ( )
126
126
}
127
127
}
128
128
}
0 commit comments