raml-org / api-modeling-framework

DEPRECATED - This project has been moved
https://github.com/aml-org/amf
Other
27 stars 11 forks source link

Web deployable version of the user interface #20

Closed antoniogarrote closed 7 years ago

antoniogarrote commented 7 years ago

We need to make the demo application, currently located in /api-modeller as an electron app, deployable as a single page web application.

In order to achieve that, we need to complete a set of subtasks:

Right now the target of the clojurescript code is node, as you can see in the main project.clj file (https://github.com/clojure/clojurescript/wiki/Compiler-Options#target this is the explanation of the target option)

We need a new target in the project to generate a single stand-alone JS file that can be linked in the browser. The wiki of the clojurescript project includes the details for doing this.

In the browser version of the library, we'll need to load RAML and OpenAPI files using AJAX. The current implementation builds the graph of linked documents before invoking the parser. So, the js YAML and js JSON parser must support remote loading via ajax

The code for the YAML parser is in js/yaml.js. Currently uses rest that has node and browser versions.

In the case of the JSON parsing logic entirely into clojure(script) code, so it should be just the case of making sure that the function api-modelling-framework.platform/read-location in the Clojurescript version (platform.cljs) supports HTTP AJAX requests.

Located in /api-modeller. Just a regular JS app. Browserify should do the trick

To test the application, we need a HTTP accessible version of the world-music API.

postatum commented 7 years ago