Package com.wordnik.swagger.model

Examples of com.wordnik.swagger.model.ApiListing.apiVersion()


        apiDocumentationController.setApiVersion("v1");
        apiDocumentationController.setBaseControllerPackage(BASE_CONTROLLER_PACKAGE);
        apiDocumentationController.setBasePath("http://localhost/swagger4spring-web-example");
        ApiListing documentation = apiDocumentationController.getDocumentation(servletRequest);
        assertNotNull(documentation);
        assertEquals(documentation.apiVersion(), "v1");
        assertEquals(documentation.resourcePath(), "/api/v1/test");
    }

    @Test
    public void getResourceList() {
View Full Code Here


                String documentationAsJSON = mapper.writeValueAsString(documentation);
                System.out.println(documentationAsJSON);
                ApiListing documentationDeserialized = JsonSerializer.asApiListing(documentationAsJSON);
                assertNotNull(documentationDeserialized);
                assertTrue(documentationDeserialized.swaggerVersion().equals(SwaggerSpec.version()));
                assertTrue(documentationDeserialized.apiVersion().equals("v1"));
                assertTrue(documentationDeserialized.basePath().equals("http://localhost:8080/api"));
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.