Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
2a519253
Commit
2a519253
authored
Aug 19, 2020
by
Piotr Gawron
Browse files
documentation for list of formats API call
parent
938d2ae9
Changes
2
Hide whitespace changes
Inline
Side-by-side
web/src/main/asciidoc/converter.adoc
0 → 100644
View file @
2a519253
= Rest API Documentation - Converter
Piotr Gawron
v{project-version} {build-time}
:toc: left
:sectnums:
Conversion API provides access to MINERVA’s ability convert between different systems biology network formats and to export of layouts to different graphical formats.
== Conversion to systems biology formats
=== List available formats
==== CURL sample
include::{snippets}/converter/list_formats/curl-request.adoc[]
==== Response Fields
include::{snippets}/converter/list_formats/response-fields.adoc[]
==== Sample Response
include::{snippets}/converter/list_formats/response-body.adoc[]
web/src/test/java/lcsb/mapviewer/web/ConvertControllerIntegrationTest.java
View file @
2a519253
package
lcsb.mapviewer.web
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
springframework
.
restdocs
.
mockmvc
.
MockMvcRestDocumentation
.
document
;
import
static
org
.
springframework
.
restdocs
.
payload
.
PayloadDocumentation
.
fieldWithPath
;
import
static
org
.
springframework
.
restdocs
.
payload
.
PayloadDocumentation
.
responseFields
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
request
.
MockMvcRequestBuilders
.
get
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
request
.
MockMvcRequestBuilders
.
post
;
import
static
org
.
springframework
.
test
.
web
.
servlet
.
result
.
MockMvcResultMatchers
.
status
;
...
...
@@ -97,4 +101,26 @@ public class ConvertControllerIntegrationTest extends ControllerIntegrationTest
assertEquals
(
1
,
s3
);
}
@Test
public
void
testListAvailableFormats
()
throws
Exception
{
RequestBuilder
request
=
get
(
"/convert/"
);
mockMvc
.
perform
(
request
)
.
andExpect
(
status
().
is2xxSuccessful
())
.
andDo
(
document
(
"converter/list_formats"
,
responseFields
(
fieldWithPath
(
"inputs"
)
.
description
(
"list of available input formats"
)
.
type
(
"Array"
),
fieldWithPath
(
"inputs[].available_names"
)
.
description
(
"list of names that could be used for specific format"
)
.
type
(
"Array<String>"
),
fieldWithPath
(
"outputs"
)
.
description
(
"list of available input formats"
)
.
type
(
"Array"
),
fieldWithPath
(
"outputs[].available_names"
)
.
description
(
"list of names that could be used for specific format"
)
.
type
(
"Array<String>"
))));
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment