Skip to content

ApiExplorer

Seray Uzgur edited this page Oct 4, 2017 · 2 revisions

API Explorer

This module aims to help developer with showing what is the real status of the weld and and it's data.

Exploler is an interface which is generated by weld according to the mocked services and data inside db. This inteface generates a simple html/js combination which aims to make usage of weld easy.

Explorer has components listed below;

  • Menu : A simple navigation view to use following views.

  • JsonView : A view where you can see the hierarchical parsed data. A foldable, colored simple tree. It will help developer to navigate through data easily

    For example;

explorer.png

  • PathView : A view to show the query url of you selection from the JsonView. It will help developer to create urls easyily for the desired data.

    For example;

explorerSelection.png

  • QueryView : A view which will help developer to use and learn query API of the weld. This view must show it's result in a JsonView.

    For example

    GET /cars?fields=manufacturer,model,id,color.

All operations done at UI must reflect to the URL and the state of the UI must be recoverable from the URL again. Weld only opens Explorer then UI reads the path and query params to restore its state.

For example;

Operation URL
Open QueryView from menu http://127.0.0.1:8080/_explorer/queryView
Write. a simple query and get results http://127.0.0.1:8080/_explorer/queryView/?data=cars?fields=manufacturer,model,id,color
Open PathView http://127.0.0.1:8080/_explorer/pathView
Select a path http://127.0.0.1:8080/_explorer/pathView/?data=posts/1/tags/1/name
Clone this wiki locally