@@ -244,11 +244,11 @@ func getValidationTests(t *testing.T) []*validationTest {
244244 },
245245 wantErrParam : "status" ,
246246 wantErrParamIn : "query" ,
247- wantErrSchemaReason : "value is not one of the allowed values" ,
247+ wantErrSchemaReason : "value \" available,sold \" is not one of the allowed values" ,
248248 wantErrSchemaPath : "/0" ,
249249 wantErrSchemaValue : "available,sold" ,
250250 wantErrResponse : & ValidationError {Status : http .StatusBadRequest ,
251- Title : "value is not one of the allowed values" ,
251+ Title : "value \" available,sold \" is not one of the allowed values" ,
252252 Detail : "value available,sold at /0 must be one of: available, pending, sold; " +
253253 // TODO: do we really want to use this heuristic to guess
254254 // that they're using the wrong serialization?
@@ -262,11 +262,11 @@ func getValidationTests(t *testing.T) []*validationTest {
262262 },
263263 wantErrParam : "status" ,
264264 wantErrParamIn : "query" ,
265- wantErrSchemaReason : "value is not one of the allowed values" ,
265+ wantErrSchemaReason : "value \" watdis \" is not one of the allowed values" ,
266266 wantErrSchemaPath : "/1" ,
267267 wantErrSchemaValue : "watdis" ,
268268 wantErrResponse : & ValidationError {Status : http .StatusBadRequest ,
269- Title : "value is not one of the allowed values" ,
269+ Title : "value \" watdis \" is not one of the allowed values" ,
270270 Detail : "value watdis at /1 must be one of: available, pending, sold" ,
271271 Source : & ValidationErrorSource {Parameter : "status" }},
272272 },
@@ -278,11 +278,11 @@ func getValidationTests(t *testing.T) []*validationTest {
278278 },
279279 wantErrParam : "kind" ,
280280 wantErrParamIn : "query" ,
281- wantErrSchemaReason : "value is not one of the allowed values" ,
281+ wantErrSchemaReason : "value \" fish,with,commas \" is not one of the allowed values" ,
282282 wantErrSchemaPath : "/1" ,
283283 wantErrSchemaValue : "fish,with,commas" ,
284284 wantErrResponse : & ValidationError {Status : http .StatusBadRequest ,
285- Title : "value is not one of the allowed values" ,
285+ Title : "value \" fish,with,commas \" is not one of the allowed values" ,
286286 Detail : "value fish,with,commas at /1 must be one of: dog, cat, turtle, bird,with,commas" ,
287287 // No 'perhaps you intended' because its the right serialization format
288288 Source : & ValidationErrorSource {Parameter : "kind" }},
@@ -304,11 +304,11 @@ func getValidationTests(t *testing.T) []*validationTest {
304304 },
305305 wantErrParam : "x-environment" ,
306306 wantErrParamIn : "header" ,
307- wantErrSchemaReason : "value is not one of the allowed values" ,
307+ wantErrSchemaReason : "value \" watdis \" is not one of the allowed values" ,
308308 wantErrSchemaPath : "/" ,
309309 wantErrSchemaValue : "watdis" ,
310310 wantErrResponse : & ValidationError {Status : http .StatusBadRequest ,
311- Title : "value is not one of the allowed values" ,
311+ Title : "value \" watdis \" is not one of the allowed values" ,
312312 Detail : "value watdis at / must be one of: demo, prod" ,
313313 Source : & ValidationErrorSource {Parameter : "x-environment" }},
314314 },
@@ -323,11 +323,11 @@ func getValidationTests(t *testing.T) []*validationTest {
323323 r : newPetstoreRequest (t , http .MethodPost , "/pet" , bytes .NewBufferString (`{"status":"watdis"}` )),
324324 },
325325 wantErrReason : "doesn't match the schema" ,
326- wantErrSchemaReason : "value is not one of the allowed values" ,
326+ wantErrSchemaReason : "value \" watdis \" is not one of the allowed values" ,
327327 wantErrSchemaValue : "watdis" ,
328328 wantErrSchemaPath : "/status" ,
329329 wantErrResponse : & ValidationError {Status : http .StatusUnprocessableEntity ,
330- Title : "value is not one of the allowed values" ,
330+ Title : "value \" watdis \" is not one of the allowed values" ,
331331 Detail : "value watdis at /status must be one of: available, pending, sold" ,
332332 Source : & ValidationErrorSource {Pointer : "/status" }},
333333 },
0 commit comments