'links' is an array, not a singleton -- correct that.
Change-Id: I10ef1929d1ec13a5a111e7063baeca62141892e8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
public Response readJsonData() {
return Response.status(Status.OK)
.entity("{\n"
- + " \"links\" : {\n"
- + " \"rel\" : \"restconf\",\n"
- + " \"href\" : \"/" + restconfRoot + "\"\n"
- + " }\n"
+ + " \"links\" : [\n"
+ + " {\n"
+ + " \"rel\" : \"restconf\",\n"
+ + " \"href\" : \"/" + restconfRoot + "\"\n"
+ + " }\n"
+ + " ]\n"
+ "}")
.build();
}
assertEquals(200, response.getStatus());
assertEquals("""
{
- "links" : {
- "rel" : "restconf",
- "href" : "/fooBarBaz"
- }
+ "links" : [
+ {
+ "rel" : "restconf",
+ "href" : "/fooBarBaz"
+ }
+ ]
}""", response.getEntity());
}