File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
main/kotlin/com/ctrlhub/core/datacapture/response
test/kotlin/com/ctrlhub/core/datacapture Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -42,9 +42,7 @@ data class FormSchema @JsonCreator constructor(
4242 " attributes" to attributes
4343 )
4444
45- val envelope = mapOf (" data" to dataMap)
46-
47- return mapper.writeValueAsString(envelope)
45+ return mapper.writeValueAsString(dataMap)
4846 }
4947}
5048
Original file line number Diff line number Diff line change @@ -36,10 +36,10 @@ class FormSchemaRawSchemaTest {
3636 // Parse the generated JSON and assert structure
3737 val node = mapper.readTree(raw)
3838
39- assertEquals(id, node[" data " ][ " id" ].asText())
40- assertEquals(" form-schemas" , node[" data " ][ " type" ].asText())
39+ assertEquals(id, node[" id" ].asText())
40+ assertEquals(" form-schemas" , node[" type" ].asText())
4141
42- val attributes = node[" data " ][ " attributes" ]
42+ val attributes = node[" attributes" ]
4343 assertEquals(version, attributes[" version" ].asText())
4444 assertTrue(attributes[" model" ][" properties" ].has(" field-1" ))
4545 }
You can’t perform that action at this time.
0 commit comments