Commit 97b021ef authored by Piotr Gawron's avatar Piotr Gawron
Browse files

docs for merging API call

parent 4b24a5bb
Pipeline #31405 passed with stage
in 15 minutes and 18 seconds
......@@ -47,3 +47,16 @@ include::{snippets}/converter/image_conversion/curl-request.adoc[]
==== Path Parameters
include::{snippets}/converter/image_conversion/path-parameters.adoc[]
== Merging of maps
=== Merge
This API call allows to merge few files into one. Layout of merged map files will be a simple matrix.
==== CURL sample
include::{snippets}/converter/merge_maps/curl-request.adoc[]
==== Path Parameters
include::{snippets}/converter/merge_maps/path-parameters.adoc[]
==== Input file structure
Input file should be a zip file with single zip folder called "maps". All map files to merge should be located in this folder.
......@@ -82,10 +82,18 @@ public class ConvertControllerIntegrationTest extends ControllerIntegrationTest
@Test
public void testMergeCellDesignerMaps() throws Exception {
byte[] body = Files.readAllBytes(new File("src/test/resources/convert/cd-maps.zip").toPath());
RequestBuilder request = post("/convert/merge/CellDesigner_SBML:CellDesigner_SBML")
.content(body);
RequestBuilder request = post("/convert/merge/{inputFormat}:{outputFormat}", "CellDesigner_SBML",
"CellDesigner_SBML")
.header("post-filename", "maps.zip")
.content(body);
byte[] content = mockMvc.perform(request)
.andDo(document("converter/merge_maps",
pathParameters(
parameterWithName("inputFormat")
.description("input format, available options: " + getConverters()),
parameterWithName("outputFormat")
.description("output format, available options: " + getConverters()))))
.andExpect(status().is2xxSuccessful())
.andReturn().getResponse().getContentAsByteArray();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment