Search in sources :

Example 11 with JsonMapObject

use of org.apache.cxf.jaxrs.json.basic.JsonMapObject in project cxf by apache.

the class SwaggerToOpenApiConversionUtilsTest method verifyUserPath.

private void verifyUserPath(JsonMapObject paths, OpenApiConfiguration cfg) {
    // /user
    JsonMapObject user = paths.getJsonMapProperty("/user");
    assertEquals(1, user.size());
    verifyUserPathPost(user, cfg);
}
Also used : JsonMapObject(org.apache.cxf.jaxrs.json.basic.JsonMapObject)

Example 12 with JsonMapObject

use of org.apache.cxf.jaxrs.json.basic.JsonMapObject in project cxf by apache.

the class SwaggerToOpenApiConversionUtilsTest method verifyUserCreateWithListPath.

private void verifyUserCreateWithListPath(JsonMapObject paths, OpenApiConfiguration cfg) {
    // /user/createWithList
    JsonMapObject user = paths.getJsonMapProperty("/user/createWithList");
    assertEquals(1, user.size());
    verifyUserCreateWithListPathPost(user, cfg);
}
Also used : JsonMapObject(org.apache.cxf.jaxrs.json.basic.JsonMapObject)

Example 13 with JsonMapObject

use of org.apache.cxf.jaxrs.json.basic.JsonMapObject in project cxf by apache.

the class SwaggerToOpenApiConversionUtilsTest method verifyServersProperty.

private void verifyServersProperty(JsonMapObject sw3) {
    List<Map<String, Object>> servers = sw3.getListMapProperty("servers");
    assertEquals(1, servers.size());
    JsonMapObject server = new JsonMapObject(servers.get(0));
    assertEquals(1, server.size());
    assertEquals("http://petstore.swagger.io/v2", server.getStringProperty("url"));
}
Also used : Map(java.util.Map) JsonMapObject(org.apache.cxf.jaxrs.json.basic.JsonMapObject)

Example 14 with JsonMapObject

use of org.apache.cxf.jaxrs.json.basic.JsonMapObject in project cxf by apache.

the class SwaggerToOpenApiConversionUtilsTest method verifyStoreOrderPath.

private void verifyStoreOrderPath(JsonMapObject paths, OpenApiConfiguration cfg) {
    // /store/order
    JsonMapObject store = paths.getJsonMapProperty("/store/order");
    assertEquals(1, store.size());
    verifyStoreOrderPathPost(store, cfg);
}
Also used : JsonMapObject(org.apache.cxf.jaxrs.json.basic.JsonMapObject)

Example 15 with JsonMapObject

use of org.apache.cxf.jaxrs.json.basic.JsonMapObject in project cxf by apache.

the class SwaggerToOpenApiConversionUtilsTest method verifyPetFindByTagsPath.

private void verifyPetFindByTagsPath(JsonMapObject paths) {
    // /pet/findByTags
    JsonMapObject pet = paths.getJsonMapProperty("/pet/findByTags");
    assertEquals(1, pet.size());
    verifyPetFindByStatusOrTags(pet, "findPetsByTags");
}
Also used : JsonMapObject(org.apache.cxf.jaxrs.json.basic.JsonMapObject)

Aggregations

JsonMapObject (org.apache.cxf.jaxrs.json.basic.JsonMapObject)63 Map (java.util.Map)23 LinkedHashMap (java.util.LinkedHashMap)5 JsonMapObjectReaderWriter (org.apache.cxf.jaxrs.json.basic.JsonMapObjectReaderWriter)5 Test (org.junit.Test)3 LinkedList (java.util.LinkedList)2 IOException (java.io.IOException)1 WebApplicationException (javax.ws.rs.WebApplicationException)1 WebClient (org.apache.cxf.jaxrs.client.WebClient)1