Search in sources :

Example 51 with JsonMapObject

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

the class SwaggerToOpenApiConversionUtilsTest method verifyStoreOrderIdPath.

private void verifyStoreOrderIdPath(JsonMapObject paths) {
    // /store/order/{orderId}
    JsonMapObject store = paths.getJsonMapProperty("/store/order/{orderId}");
    assertEquals(2, store.size());
    verifyStoreOrderIdPathGet(store);
    verifyStoreOrderIdPathDelete(store);
}
Also used : JsonMapObject(org.apache.cxf.jaxrs.json.basic.JsonMapObject)

Example 52 with JsonMapObject

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

the class SwaggerToOpenApiConversionUtilsTest method verifyUserCreateWithArrayPath.

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

Example 53 with JsonMapObject

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

the class SwaggerToOpenApiConversionUtilsTest method verifyPetIdPathPost.

private void verifyPetIdPathPost(JsonMapObject pet) {
    JsonMapObject petPost = pet.getJsonMapProperty("post");
    assertEquals(8, petPost.size());
    testCommonVerbProps(petPost, "updatePetWithForm");
    List<Map<String, Object>> parameters = petPost.getListMapProperty("parameters");
    assertEquals(1, parameters.size());
    JsonMapObject pathIdParam = new JsonMapObject(parameters.get(0));
    verifyPetIdParameter(pathIdParam);
    verifyPetFormContent(petPost, "application/x-www-form-urlencoded", "name", "status");
    JsonMapObject responses = petPost.getJsonMapProperty("responses");
    assertEquals(1, responses.size());
    assertNotNull(responses.getProperty("405"));
}
Also used : Map(java.util.Map) JsonMapObject(org.apache.cxf.jaxrs.json.basic.JsonMapObject)

Example 54 with JsonMapObject

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

the class SwaggerToOpenApiConversionUtilsTest method verifyPetFindByStatusPath.

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

Example 55 with JsonMapObject

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

the class SwaggerToOpenApiConversionUtilsTest method verifyPetIdUploadImagePath.

private void verifyPetIdUploadImagePath(JsonMapObject paths) {
    // /pet/{petId}/uploadImage
    JsonMapObject pet = paths.getJsonMapProperty("/pet/{petId}/uploadImage");
    assertEquals(1, pet.size());
    verifyPetIdUploadImagePathPost(pet);
}
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