I have a Cloudify 2.7.0 instance running. I need to access Cloudify's API from a Java application and I found an incongruity between the returned JSON and the one which is documented in the Cloudify documentation. The API is
/service/applications
In the documentation I can read that it should return the following JSON string
{
"status" : "success",
"response" : [ "petclinic", "travel" ]
}
But if I do the same request to my Cloudify instance I get the following JSON string
{
"status" : "success",
"response" : {
"petclinic": "",
"travel":""
}
}
In the java application the JSON information is stored in the following POJO (generated with JSONSchema2POJO)
// CloudifyResponse.java
public class CloudifyResponse {
@JsonProperty("response")
private Response response;
@JsonProperty("status")
private String status;
// getters and setters
}
// Response.java
public class Response {
@JsonProperty("helloworld")
private String helloworld;
@JsonProperty("petclinic")
private String petclinic;
// getters and setters
}
I use the Jackson library to deserialize JSON into POJO. As you can see the JSON string is deserialized into a POJO in which every istantiated application is a POJO's field. This might be a big problem for the development of the application. In fact, as the instances of the application change, the returned JSON changes and we need to update the POJO structure, something I can't do at runtime.
Do you know whether the Cloudify API has changed the response JSON structure? Is there any way to get the documented JSON output instead of the one I get.
Thank you in advance
Giulio