xenon-middleware / xenonflow

Run CWL workflows using Xenon through a REST api
https://xenon-middleware.github.io/xenonflow/
Apache License 2.0
4 stars 2 forks source link

Auto generate swapper api from CWL files #9

Open nielsdrost opened 7 years ago

nielsdrost commented 7 years ago

We should auto generate the swagger api from the CWL files.

nielsdrost commented 7 years ago

Using Spring it is relatively easy to handle dynamic API's:

http://docs.spring.io/spring/docs/3.1.0.RELEASE/spring-framework-reference/html/mvc.html#mvc-ann-requestmapping-uri-templates-regex

sverhoeven commented 7 years ago

Spring only handles dynamic url, not the dynamic type of the request/response.

To make a swagger api you need to extend the io.swagger.models.Swagger object with submit/retrieve operations translated from the CWL input/output bindings.

You would also need to add endpoints to the web server (jetty) that correspond to those swagger endpoints. For exampe in molviewer webservice I register my own resources.