Package com.knappsack.swagger4springweb.parser

Examples of com.knappsack.swagger4springweb.parser.ApiParser


        if (documentation == null || (filters != null && !filters.isEmpty())) {
            String servletPath = null;
            if (request != null) {
                servletPath = request.getServletPath();
            }
            ApiParser apiParser = new ApiParserImpl(apiInfo, authorizationTypes, getControllerPackages(), getBasePath(),
                    servletPath, apiVersion, ignorableAnnotations, ignoreUnusedPathVariables, filters);
            documentation = apiParser.createApiListings();
        }
        return documentation;
    }
View Full Code Here


            String servletPath = null;
            if (request != null) {
                servletPath = request.getServletPath();
                servletPath = servletPath.replace("/resourceList", "");
            }
            ApiParser apiParser = new ApiParserImpl(apiInfo, authorizationTypes, getControllerPackages(), getBasePath(),
                    servletPath, apiVersion, ignorableAnnotations, ignoreUnusedPathVariables, filters);
            resourceList = apiParser.getResourceListing(getDocs(request));
        }
        return resourceList;
    }
View Full Code Here

        }
    }

    @Test
    public void testOperationApiExclude() {
        ApiParser apiParser = createApiParser(Arrays.asList(BASE_CONTROLLER_PACKAGE + ".exclude"));
        Map<String, ApiListing> documents = apiParser.createApiListings();

        assertEquals(1, documents.size()); // ExcludeClassTestController excluded completely

        // validate that we don't expose any excluded operations in the documents
        for (ApiListing documentation : documents.values()) {
View Full Code Here

        }
    }

    @Test
    public void testResourceListing() {
        ApiParser apiParser = createApiParser();
        Map<String, ApiListing> documentList = apiParser.createApiListings();
        ResourceListing resourceList = apiParser.getResourceListing(documentList);

//        assertEquals("http://localhost:8080/api", resourceList.basePath());
//        assertEquals("v1", resourceList.apiVersion());
//        assertEquals(END_POINT_PATHS.size(), resourceList.getApis().size());
//
View Full Code Here

//        }
    }

    @Test
    public void testNoClassRequestMapping() {
        ApiParser apiParser = createApiParser();
        Map<String, ApiListing> documentList = apiParser.createApiListings();
        ResourceListing resourceList = apiParser.getResourceListing(documentList);
        for (ApiListingReference api: ScalaToJavaUtil.toJavaList(resourceList.apis())) {
            assertNotNull("could not get api listing for path: " + api.path(), documentList.get(api.path().substring(4))); // each api should be accessible using the ApiListingReference minus /doc
        }
    }
View Full Code Here

TOP

Related Classes of com.knappsack.swagger4springweb.parser.ApiParser

Copyright © 2018 www.massapicom. 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.