Search in sources :

Example 1 with EnunciateFileReader

use of com.emc.apidocs.differencing.EnunciateFileReader in project coprhd-controller by CoprHD.

the class EncunciationReaderTests method main.

public static void main(String[] args) throws Exception {
    InputStream enunciateStream = EncunciationReaderTests.class.getResourceAsStream("apisvc-1.1.xml");
    EnunciateFileReader reader = new EnunciateFileReader();
    Map<String, ApiService> services = reader.loadServices(enunciateStream);
    for (ApiService service : services.values()) {
        System.out.println(service.getFqJavaClassName());
        for (ApiMethod method : service.methods) {
            System.out.println("== " + method.httpMethod + " " + method.path);
            if (method.input != null) {
                System.out.println("==---  IN : " + method.input.name);
            }
            if (method.output != null) {
                System.out.println("==---  OUT : " + method.output.name);
            }
        }
    }
}
Also used : ApiService(com.emc.apidocs.model.ApiService) InputStream(java.io.InputStream) ApiMethod(com.emc.apidocs.model.ApiMethod) EnunciateFileReader(com.emc.apidocs.differencing.EnunciateFileReader)

Aggregations

EnunciateFileReader (com.emc.apidocs.differencing.EnunciateFileReader)1 ApiMethod (com.emc.apidocs.model.ApiMethod)1 ApiService (com.emc.apidocs.model.ApiService)1 InputStream (java.io.InputStream)1