@@ -77,14 +77,14 @@ function validateTracking(fileContents: any): ValidationResult {
77
77
78
78
if ( tracking . status !== 'final' ) {
79
79
errors . push ( {
80
- instancePath : 'document/tracking/status' ,
80
+ instancePath : '/ document/tracking/status' ,
81
81
message : 'status must equal `final`.' ,
82
82
} ) ;
83
83
}
84
84
85
85
if ( tracking . revision_history [ 0 ] . date != tracking . current_release_date ) {
86
86
errors . push ( {
87
- instancePath : 'document/tracking/current_release_date' ,
87
+ instancePath : '/ document/tracking/current_release_date' ,
88
88
message : 'current_release_date does not match latest revision history.' ,
89
89
} ) ;
90
90
}
@@ -94,7 +94,7 @@ function validateTracking(fileContents: any): ValidationResult {
94
94
tracking . initial_release_date
95
95
) {
96
96
errors . push ( {
97
- instancePath : 'document/tracking/initial_release_date' ,
97
+ instancePath : '/ document/tracking/initial_release_date' ,
98
98
message : 'initial_release_date does not match first revision history.' ,
99
99
} ) ;
100
100
}
@@ -115,7 +115,7 @@ function validateTracking(fileContents: any): ValidationResult {
115
115
versioningSystem
116
116
) {
117
117
errors . push ( {
118
- instancePath : `document/revision_history/${ i } /number` ,
118
+ instancePath : `/ document/revision_history/${ i } /number` ,
119
119
message : 'number version system inconsistent.' ,
120
120
} ) ;
121
121
}
@@ -138,14 +138,14 @@ function validateDistribution(fileContents: any): ValidationResult {
138
138
139
139
if ( ( distribution . text as string ) !== standardisedDistributionInfo ) {
140
140
errors . push ( {
141
- instancePath : 'document/distribution/text' ,
141
+ instancePath : '/ document/distribution/text' ,
142
142
message : `text must be \`${ standardisedDistributionInfo } \`` ,
143
143
} ) ;
144
144
}
145
145
146
146
if ( distribution . tlp ?. label !== 'WHITE' ) {
147
147
errors . push ( {
148
- instancePath : 'document/distribution/tlp/label' ,
148
+ instancePath : '/ document/distribution/tlp/label' ,
149
149
message : 'label must be `WHITE`' ,
150
150
} ) ;
151
151
}
@@ -167,14 +167,14 @@ function validateProductTree(fileContents: any): ValidationResult {
167
167
const lbRootBranch = productTree [ lbRootBranchIndex ] ;
168
168
if ( lbRootBranch . category !== 'vendor' ) {
169
169
errors . push ( {
170
- instancePath : `product_tree/branches/${ lbRootBranchIndex } /category` ,
170
+ instancePath : `/ product_tree/branches/${ lbRootBranchIndex } /category` ,
171
171
message :
172
172
'category must be `vendor` for `The LoopBack Maintainers` vendor root branch.' ,
173
173
} ) ;
174
174
}
175
175
} else {
176
176
errors . push ( {
177
- instancePath : 'product_tree/branches' ,
177
+ instancePath : '/ product_tree/branches' ,
178
178
message : '`The LoopBack Maintainers` vendor root branch must exist.' ,
179
179
} ) ;
180
180
}
@@ -191,21 +191,21 @@ function validatePublisher(fileContents: any): ValidationResult {
191
191
192
192
if ( publisher . category !== 'vendor' ) {
193
193
errors . push ( {
194
- instancePath : 'document/publisher/category' ,
194
+ instancePath : '/ document/publisher/category' ,
195
195
message : 'category must equal `vendor`' ,
196
196
} ) ;
197
197
}
198
198
199
199
if ( publisher . name !== 'The LoopBack Maintainers' ) {
200
200
errors . push ( {
201
- instancePath : 'document/publisher/name' ,
201
+ instancePath : '/ document/publisher/name' ,
202
202
message : 'name must equal `The LoopBack Maintainers`' ,
203
203
} ) ;
204
204
}
205
205
206
206
if ( publisher . namespace !== 'https://loopback.io' ) {
207
207
errors . push ( {
208
- instancePath : 'document/publisher/namespace' ,
208
+ instancePath : '/ document/publisher/namespace' ,
209
209
message : 'namespace must equal `https://loopback.io`' ,
210
210
} ) ;
211
211
}
0 commit comments