@Test public void convertWsdl() { System.out.println("Execute on " + wsdl); OpenAPI openApi = converter.toOpenAPI(this.getClass().getResourceAsStream(wsdl)); assertNotNull("OpenAPI should be generated", openApi); Info info = openApi.getInfo(); assertNotNull("Info is required", info); assertFalse("Title is required", isNullOrEmpty(info.getTitle())); assertFalse("Version is required", isNullOrEmpty(info.getVersion())); List<Server> servers = openApi.getServers(); assertNotNull("Servers is required", servers); assertEquals("Servers is required", expectedServers, servers.size()); Paths paths = openApi.getPaths(); assertNotNull("Paths is required", paths); assertEquals("Not enough paths", expectedPaths, paths.size()); int soapEnvelopes = 0; for (PathItem path : paths.values()) { Optional<State> optState = Arrays.asList(checkOperation(path.getPost()), checkOperation(path.getGet()), checkOperation(path.getPut()), checkOperation(path.getDelete())) .stream() .filter(state -> state != State.NO_OP).findFirst(); if (optState.isPresent()) { if (optState.get().equals(State.ENVELOPE)) { ++soapEnvelopes; } } else { fail("operation is missing for path"); } } assertEquals("Not enough SoapEnvelopes", expectedSoapEnvelopes, soapEnvelopes); }
@Override public OpenAPI toOpenAPI(String content) { return toOpenAPI(new ByteArrayInputStream(content.getBytes())); }
WSDLToOpenAPIConverter implements OpenAPIConverter { @Override public OpenAPI toOpenAPI(String content) { return toOpenAPI(new ByteArrayInputStream(content.getBytes())); } }
WSDLToOpenAPIConverter implements OpenAPIConverter { @Override public OpenAPI toOpenAPI(String content) { return toOpenAPI(new ByteArrayInputStream(content.getBytes())); }  }
WSDLToOpenAPIConverter implements OpenAPIConverter { @Override public OpenAPI toOpenAPI(String content) { return toOpenAPI(new ByteArrayInputStream(content.getBytes())); }  @Override OpenAPI toOpenAPI(String content); @Override OpenAPI toOpenAPI(InputStream stream); }
WSDLToOpenAPIConverter implements OpenAPIConverter { @Override public OpenAPI toOpenAPI(String content) { return toOpenAPI(new ByteArrayInputStream(content.getBytes())); }  @Override OpenAPI toOpenAPI(String content); @Override OpenAPI toOpenAPI(InputStream stream); static final Logger LOGGER; static final String SOAP_EXTENSION_ENVELOPE; static final String SOAP_EXTENSION_ACTION; }