@@ -157,14 +157,14 @@ func TestMinLength(t *testing.T) {
157
157
require .NoError (t , err )
158
158
159
159
t .Run (fmt .Sprintf ("%s less than minimum length of %d (%s)" , testTable .propertyPointerString , testTable .minLength , testTable .complianceLevel ), func (t * testing.T ) {
160
- assert .True (t , schema .PropertyLessThanMinLength (strings . TrimPrefix ( testTable .propertyPointerString , "/" ) , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
160
+ assert .True (t , schema .PropertyLessThanMinLength (testTable .propertyPointerString , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
161
161
})
162
162
163
163
// Test schema validation results with minimum value length.
164
164
propertyPointer .Set (packageIndex , strings .Repeat ("a" , testTable .minLength ))
165
165
166
166
t .Run (fmt .Sprintf ("%s at minimum length of %d (%s)" , testTable .propertyPointerString , testTable .minLength , testTable .complianceLevel ), func (t * testing.T ) {
167
- assert .False (t , schema .PropertyLessThanMinLength (strings . TrimPrefix ( testTable .propertyPointerString , "/" ) , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
167
+ assert .False (t , schema .PropertyLessThanMinLength (testTable .propertyPointerString , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
168
168
})
169
169
}
170
170
}
@@ -316,7 +316,7 @@ func TestRequired(t *testing.T) {
316
316
317
317
validationResult := packageindex .Validate (packageIndex )
318
318
t .Run (fmt .Sprintf ("%s (%s)" , testTable .propertyPointerString , testTable .complianceLevel ), func (t * testing.T ) {
319
- testTable .assertion (t , schema .RequiredPropertyMissing (strings . TrimPrefix ( testTable .propertyPointerString , "/" ) , validationResult [testTable .complianceLevel ]))
319
+ testTable .assertion (t , schema .RequiredPropertyMissing (testTable .propertyPointerString , validationResult [testTable .complianceLevel ]))
320
320
})
321
321
}
322
322
}
@@ -348,7 +348,7 @@ func TestEnum(t *testing.T) {
348
348
require .NoError (t , err )
349
349
350
350
t .Run (fmt .Sprintf ("%s: %s (%s)" , testTable .propertyPointerString , testTable .propertyValue , testTable .complianceLevel ), func (t * testing.T ) {
351
- testTable .assertion (t , schema .PropertyEnumMismatch (strings . TrimPrefix ( testTable .propertyPointerString , "/" ) , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
351
+ testTable .assertion (t , schema .PropertyEnumMismatch (testTable .propertyPointerString , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
352
352
})
353
353
}
354
354
}
@@ -512,7 +512,7 @@ func TestPattern(t *testing.T) {
512
512
require .NoError (t , err )
513
513
514
514
t .Run (fmt .Sprintf ("%s: %s (%s)" , testTable .propertyPointerString , testTable .propertyValue , testTable .complianceLevel ), func (t * testing.T ) {
515
- testTable .assertion (t , schema .PropertyPatternMismatch (strings . TrimPrefix ( testTable .propertyPointerString , "/" ) , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
515
+ testTable .assertion (t , schema .PropertyPatternMismatch (testTable .propertyPointerString , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
516
516
})
517
517
}
518
518
}
@@ -567,7 +567,7 @@ func TestType(t *testing.T) {
567
567
_ , err = propertyPointer .Set (packageIndex , testTable .propertyValue )
568
568
569
569
t .Run (fmt .Sprintf ("%s: %v (%s)" , testTable .propertyPointerString , testTable .propertyValue , complianceLevel ), func (t * testing.T ) {
570
- testTable .assertion (t , schema .PropertyTypeMismatch (strings . TrimPrefix ( testTable .propertyPointerString , "/" ) , packageindex .Validate (packageIndex )[complianceLevel ]))
570
+ testTable .assertion (t , schema .PropertyTypeMismatch (testTable .propertyPointerString , packageindex .Validate (packageIndex )[complianceLevel ]))
571
571
})
572
572
}
573
573
}
@@ -632,7 +632,7 @@ func TestFormat(t *testing.T) {
632
632
require .NoError (t , err )
633
633
634
634
t .Run (fmt .Sprintf ("%s: %s (%s)" , testTable .propertyPointerString , testTable .propertyValue , testTable .complianceLevel ), func (t * testing.T ) {
635
- testTable .assertion (t , schema .PropertyFormatMismatch (strings . TrimPrefix ( testTable .propertyPointerString , "/" ) , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
635
+ testTable .assertion (t , schema .PropertyFormatMismatch (testTable .propertyPointerString , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
636
636
})
637
637
}
638
638
}
@@ -693,7 +693,7 @@ func TestAdditionalProperties(t *testing.T) {
693
693
require .NoError (t , err )
694
694
695
695
t .Run (fmt .Sprintf ("Additional property in the %s object (%s)" , testTable .propertyPointerString , testTable .complianceLevel ), func (t * testing.T ) {
696
- testTable .assertion (t , schema .ProhibitedAdditionalProperties (strings . TrimPrefix ( testTable .propertyPointerString , "/" ) , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
696
+ testTable .assertion (t , schema .ProhibitedAdditionalProperties (testTable .propertyPointerString , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
697
697
})
698
698
}
699
699
}
0 commit comments