File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
modules/swagger-core/src/test/scala/converter Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ class SnakeCaseConverterTest extends FlatSpec with ShouldMatchers {
2929 // make sure the field bar: converter.Bar is not present
3030 ModelConverters .read(classOf [SnakeCaseModel ]) match {
3131 case Some (model) => {
32- println(JsonSerializer .asJson(model))
32+ model.id should be (" SnakeCaseModel" )
33+ model.name should be (" SnakeCaseModel" )
3334 }
3435 case _ => fail(" didn't read anything" )
3536 }
@@ -52,7 +53,10 @@ class SnakeCaseConverter extends SwaggerSchemaConverter {
5253 val property = p.copy(`type` = toSnakeCase(p.`type`))
5354 properties += key -> property
5455 })
55- model.copy(id = toSnakeCase(model.id), properties = properties)
56+ model.copy(
57+ id = toSnakeCase(model.id),
58+ name = toSnakeCase(model.name),
59+ properties = properties)
5660 })
5761 }
5862
@@ -63,4 +67,4 @@ class SnakeCaseConverter extends SwaggerSchemaConverter {
6367 case false => Character .toUpperCase(str.charAt(0 )) + str.substring(1 )
6468 }
6569 }
66- }
70+ }
You can’t perform that action at this time.
0 commit comments