@@ -126,8 +126,8 @@ async Task InvalidIntegerWithRangeProducesError(Endpoint endpoint)
126
126
var problemDetails = await AssertBadRequest ( context ) ;
127
127
Assert . Collection ( problemDetails . Errors , kvp =>
128
128
{
129
- Assert . Equal ( "IntegerWithRange " , kvp . Key ) ;
130
- Assert . Equal ( "The field IntegerWithRange must be between 10 and 100." , kvp . Value . Single ( ) ) ;
129
+ Assert . Equal ( "integerWithRange " , kvp . Key ) ;
130
+ Assert . Equal ( "The field integerWithRange must be between 10 and 100." , kvp . Value . Single ( ) ) ;
131
131
} ) ;
132
132
}
133
133
@@ -145,7 +145,7 @@ async Task InvalidIntegerWithRangeAndDisplayNameProducesError(Endpoint endpoint)
145
145
var problemDetails = await AssertBadRequest ( context ) ;
146
146
Assert . Collection ( problemDetails . Errors , kvp =>
147
147
{
148
- Assert . Equal ( "IntegerWithRangeAndDisplayName " , kvp . Key ) ;
148
+ Assert . Equal ( "integerWithRangeAndDisplayName " , kvp . Key ) ;
149
149
Assert . Equal ( "The field Valid identifier must be between 10 and 100." , kvp . Value . Single ( ) ) ;
150
150
} ) ;
151
151
}
@@ -164,8 +164,8 @@ async Task MissingRequiredSubtypePropertyProducesError(Endpoint endpoint)
164
164
var problemDetails = await AssertBadRequest ( context ) ;
165
165
Assert . Collection ( problemDetails . Errors , kvp =>
166
166
{
167
- Assert . Equal ( "PropertyWithMemberAttributes " , kvp . Key ) ;
168
- Assert . Equal ( "The PropertyWithMemberAttributes field is required." , kvp . Value . Single ( ) ) ;
167
+ Assert . Equal ( "propertyWithMemberAttributes " , kvp . Key ) ;
168
+ Assert . Equal ( "The propertyWithMemberAttributes field is required." , kvp . Value . Single ( ) ) ;
169
169
} ) ;
170
170
}
171
171
@@ -187,13 +187,13 @@ async Task InvalidRequiredSubtypePropertyProducesError(Endpoint endpoint)
187
187
Assert . Collection ( problemDetails . Errors ,
188
188
kvp =>
189
189
{
190
- Assert . Equal ( "PropertyWithMemberAttributes.RequiredProperty " , kvp . Key ) ;
191
- Assert . Equal ( "The RequiredProperty field is required." , kvp . Value . Single ( ) ) ;
190
+ Assert . Equal ( "propertyWithMemberAttributes.requiredProperty " , kvp . Key ) ;
191
+ Assert . Equal ( "The requiredProperty field is required." , kvp . Value . Single ( ) ) ;
192
192
} ,
193
193
kvp =>
194
194
{
195
- Assert . Equal ( "PropertyWithMemberAttributes.StringWithLength " , kvp . Key ) ;
196
- Assert . Equal ( "The field StringWithLength must be a string with a maximum length of 10." , kvp . Value . Single ( ) ) ;
195
+ Assert . Equal ( "propertyWithMemberAttributes.stringWithLength " , kvp . Key ) ;
196
+ Assert . Equal ( "The field stringWithLength must be a string with a maximum length of 10." , kvp . Value . Single ( ) ) ;
197
197
} ) ;
198
198
}
199
199
@@ -216,18 +216,18 @@ async Task InvalidSubTypeWithInheritancePropertyProducesError(Endpoint endpoint)
216
216
Assert . Collection ( problemDetails . Errors ,
217
217
kvp =>
218
218
{
219
- Assert . Equal ( "PropertyWithInheritance.EmailString " , kvp . Key ) ;
220
- Assert . Equal ( "The EmailString field is not a valid e-mail address." , kvp . Value . Single ( ) ) ;
219
+ Assert . Equal ( "propertyWithInheritance.emailString " , kvp . Key ) ;
220
+ Assert . Equal ( "The emailString field is not a valid e-mail address." , kvp . Value . Single ( ) ) ;
221
221
} ,
222
222
kvp =>
223
223
{
224
- Assert . Equal ( "PropertyWithInheritance.RequiredProperty " , kvp . Key ) ;
225
- Assert . Equal ( "The RequiredProperty field is required." , kvp . Value . Single ( ) ) ;
224
+ Assert . Equal ( "propertyWithInheritance.requiredProperty " , kvp . Key ) ;
225
+ Assert . Equal ( "The requiredProperty field is required." , kvp . Value . Single ( ) ) ;
226
226
} ,
227
227
kvp =>
228
228
{
229
- Assert . Equal ( "PropertyWithInheritance.StringWithLength " , kvp . Key ) ;
230
- Assert . Equal ( "The field StringWithLength must be a string with a maximum length of 10." , kvp . Value . Single ( ) ) ;
229
+ Assert . Equal ( "propertyWithInheritance.stringWithLength " , kvp . Key ) ;
230
+ Assert . Equal ( "The field stringWithLength must be a string with a maximum length of 10." , kvp . Value . Single ( ) ) ;
231
231
} ) ;
232
232
}
233
233
@@ -259,18 +259,18 @@ async Task InvalidListOfSubTypesProducesError(Endpoint endpoint)
259
259
Assert . Collection ( problemDetails . Errors ,
260
260
kvp =>
261
261
{
262
- Assert . Equal ( "ListOfSubTypes [0].RequiredProperty " , kvp . Key ) ;
263
- Assert . Equal ( "The RequiredProperty field is required." , kvp . Value . Single ( ) ) ;
262
+ Assert . Equal ( "listOfSubTypes [0].requiredProperty " , kvp . Key ) ;
263
+ Assert . Equal ( "The requiredProperty field is required." , kvp . Value . Single ( ) ) ;
264
264
} ,
265
265
kvp =>
266
266
{
267
- Assert . Equal ( "ListOfSubTypes [0].StringWithLength " , kvp . Key ) ;
268
- Assert . Equal ( "The field StringWithLength must be a string with a maximum length of 10." , kvp . Value . Single ( ) ) ;
267
+ Assert . Equal ( "listOfSubTypes [0].stringWithLength " , kvp . Key ) ;
268
+ Assert . Equal ( "The field stringWithLength must be a string with a maximum length of 10." , kvp . Value . Single ( ) ) ;
269
269
} ,
270
270
kvp =>
271
271
{
272
- Assert . Equal ( "ListOfSubTypes [1].StringWithLength " , kvp . Key ) ;
273
- Assert . Equal ( "The field StringWithLength must be a string with a maximum length of 10." , kvp . Value . Single ( ) ) ;
272
+ Assert . Equal ( "listOfSubTypes [1].stringWithLength " , kvp . Key ) ;
273
+ Assert . Equal ( "The field stringWithLength must be a string with a maximum length of 10." , kvp . Value . Single ( ) ) ;
274
274
} ) ;
275
275
}
276
276
@@ -288,7 +288,7 @@ async Task InvalidPropertyWithDerivedValidationAttributeProducesError(Endpoint e
288
288
var problemDetails = await AssertBadRequest ( context ) ;
289
289
Assert . Collection ( problemDetails . Errors , kvp =>
290
290
{
291
- Assert . Equal ( "IntegerWithDerivedValidationAttribute " , kvp . Key ) ;
291
+ Assert . Equal ( "integerWithDerivedValidationAttribute " , kvp . Key ) ;
292
292
Assert . Equal ( "Value must be an even number" , kvp . Value . Single ( ) ) ;
293
293
} ) ;
294
294
}
@@ -297,7 +297,7 @@ async Task InvalidPropertyWithMultipleAttributesProducesError(Endpoint endpoint)
297
297
{
298
298
var payload = """
299
299
{
300
- "PropertyWithMultipleAttributes ": 5
300
+ "propertyWithMultipleAttributes ": 5
301
301
}
302
302
""" ;
303
303
var context = CreateHttpContextWithPayload ( payload , serviceProvider ) ;
@@ -307,15 +307,15 @@ async Task InvalidPropertyWithMultipleAttributesProducesError(Endpoint endpoint)
307
307
var problemDetails = await AssertBadRequest ( context ) ;
308
308
Assert . Collection ( problemDetails . Errors , kvp =>
309
309
{
310
- Assert . Equal ( "PropertyWithMultipleAttributes " , kvp . Key ) ;
310
+ Assert . Equal ( "propertyWithMultipleAttributes " , kvp . Key ) ;
311
311
Assert . Collection ( kvp . Value ,
312
312
error =>
313
313
{
314
- Assert . Equal ( "The field PropertyWithMultipleAttributes is invalid." , error ) ;
314
+ Assert . Equal ( "The field propertyWithMultipleAttributes is invalid." , error ) ;
315
315
} ,
316
316
error =>
317
317
{
318
- Assert . Equal ( "The field PropertyWithMultipleAttributes must be between 10 and 100." , error ) ;
318
+ Assert . Equal ( "The field propertyWithMultipleAttributes must be between 10 and 100." , error ) ;
319
319
} ) ;
320
320
} ) ;
321
321
}
@@ -335,7 +335,7 @@ async Task InvalidPropertyWithCustomValidationProducesError(Endpoint endpoint)
335
335
var problemDetails = await AssertBadRequest ( context ) ;
336
336
Assert . Collection ( problemDetails . Errors , kvp =>
337
337
{
338
- Assert . Equal ( "IntegerWithCustomValidation " , kvp . Key ) ;
338
+ Assert . Equal ( "integerWithCustomValidation " , kvp . Key ) ;
339
339
var error = Assert . Single ( kvp . Value ) ;
340
340
Assert . Equal ( "Can't use the same number value in two properties on the same class." , error ) ;
341
341
} ) ;
0 commit comments