Package com.hypnoticocelot.jaxrs.doclet

Examples of com.hypnoticocelot.jaxrs.doclet.Recorder.record()


            String resourcePath = api.getResourcePath();
            if (!Strings.isNullOrEmpty(resourcePath)) {
                String resourceName = resourcePath.replaceFirst("/", "").replaceAll("/", "_").replaceAll("[\\{\\}]", "");
                resources.add(new ResourceListingAPI("/" + resourceName + ".{format}", ""));
                File apiFile = new File(outputDirectory, resourceName + ".json");
                recorder.record(apiFile, api);
            }
        }

        //write out json for api
        ResourceListing listing = new ResourceListing(options.getApiVersion(), options.getDocBasePath(), resources);
View Full Code Here


        }

        //write out json for api
        ResourceListing listing = new ResourceListing(options.getApiVersion(), options.getDocBasePath(), resources);
        File docFile = new File(outputDirectory, "service.json");
        recorder.record(docFile, listing);

        // Copy swagger-ui into the output directory.
        ZipInputStream swaggerZip;
        if (DocletOptions.DEFAULT_SWAGGER_UI_ZIP_PATH.equals(swaggerUiZipPath)) {
            swaggerZip = new ZipInputStream(ServiceDoclet.class.getResourceAsStream("/swagger-ui.zip"));
View Full Code Here

            if (entry.isDirectory()) {
                if (!swaggerFile.isDirectory() && !swaggerFile.mkdirs()) {
                    throw new RuntimeException("Unable to create directory: " + swaggerFile);
                }
            } else {
                recorder.record(swaggerFile, swaggerZip);
            }

            entry = swaggerZip.getNextEntry();
        }
        swaggerZip.close();
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.