Skip to content

Commit

Permalink
cover AvroJsonProp using a JSON object with heterogeneous property types
Browse files Browse the repository at this point in the history
  • Loading branch information
franckrasolo committed Aug 25, 2023
1 parent 9897cda commit def06bf
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ class AvroJsonPropSchemaTest : WordSpec() {
data class AnnotatedProperties(
@AvroJsonProp("guns", """["and", "roses"]""") val str: String,
@AvroJsonProp("jean", """["michel", "jarre"]""") val long: Long,
@AvroJsonProp(
key = "object",
jsonValue = """{
"a": "foo",
"b": 200,
"c": true,
"d": null,
"e": { "e1": null, "e2": 429 },
"f": ["bar", 404, false, null, {}]
}"""
)
val int: Int
)

Expand Down
10 changes: 9 additions & 1 deletion src/test/resources/props_json_annotation_field.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@
},
{
"name": "int",
"type": "int"
"type": "int",
"object": {
"a": "foo",
"b": 200,
"c": true,
"d": null,
"e": { "e1": null, "e2": 429 },
"f": [ "bar", 404, false, null, {} ]
}
}
]
}

0 comments on commit def06bf

Please sign in to comment.