@Test public void upload() throws IOException { OpenAPI openAPI = Json.mapper().readValue(openAPI_S, OpenAPI.class); UploadToYapi uploadToYapi = new UploadToYapi("511b6c128d2c7ff5b4cc", "http: uploadToYapi.upload(openAPI, true); }
public void upload(Object openAPI, boolean merge) throws IOException { Map<String, Object> send = new HashMap<>(4); send.put("type", "swagger"); send.put("token", projectToken); send.put("merge", merge); send.put("json", mapper.writeValueAsString(openAPI)); HttpClientUtil.getHttpclient().execute(getHttpPost(yapiUrl + IMPUT, mapper.writeValueAsString(send))); }
UploadToYapi { public void upload(Object openAPI, boolean merge) throws IOException { Map<String, Object> send = new HashMap<>(4); send.put("type", "swagger"); send.put("token", projectToken); send.put("merge", merge); send.put("json", mapper.writeValueAsString(openAPI)); HttpClientUtil.getHttpclient().execute(getHttpPost(yapiUrl + IMPUT, mapper.writeValueAsString(send))); } }
UploadToYapi { public void upload(Object openAPI, boolean merge) throws IOException { Map<String, Object> send = new HashMap<>(4); send.put("type", "swagger"); send.put("token", projectToken); send.put("merge", merge); send.put("json", mapper.writeValueAsString(openAPI)); HttpClientUtil.getHttpclient().execute(getHttpPost(yapiUrl + IMPUT, mapper.writeValueAsString(send))); } UploadToYapi(String projectToken, String yapiUrl); }
UploadToYapi { public void upload(Object openAPI, boolean merge) throws IOException { Map<String, Object> send = new HashMap<>(4); send.put("type", "swagger"); send.put("token", projectToken); send.put("merge", merge); send.put("json", mapper.writeValueAsString(openAPI)); HttpClientUtil.getHttpclient().execute(getHttpPost(yapiUrl + IMPUT, mapper.writeValueAsString(send))); } UploadToYapi(String projectToken, String yapiUrl); void upload(Object openAPI, boolean merge); }
UploadToYapi { public void upload(Object openAPI, boolean merge) throws IOException { Map<String, Object> send = new HashMap<>(4); send.put("type", "swagger"); send.put("token", projectToken); send.put("merge", merge); send.put("json", mapper.writeValueAsString(openAPI)); HttpClientUtil.getHttpclient().execute(getHttpPost(yapiUrl + IMPUT, mapper.writeValueAsString(send))); } UploadToYapi(String projectToken, String yapiUrl); void upload(Object openAPI, boolean merge); static Map<String, Map<String, Integer>> catMap; final ObjectMapper mapper; }