joffrey-bion / livedoc

A not-so-annotation-based documentation generator for REST and websocket services
MIT License
4 stars 2 forks source link

Add URL parameter to automatically insert or load documentation URL #81

Closed ST-DDT closed 6 years ago

ST-DDT commented 6 years ago

Sometimes you don't have the docs on the same server your application runs or at least the URL is not localhost for a co-worker of me. Thus it would be nice if it would be possible to prepare an URL that will automatically load (or suggest) the given URL.

Something like http://livedoc.example.com/#/fetch?url=http://10.0.0.1/myApp/jsondoc

If there is such an option already, I wasn't able to find it in the documentation.

joffrey-bion commented 6 years ago

You just need to provide the query param before the hash part:

http://livedoc.example.com?url=http://10.0.0.1/myApp/jsondoc#/fetch

You may as well forget about the hash part altogether:

http://livedoc.example.com?url=http://10.0.0.1/myApp/jsondoc

This parameter is documented in the page about Livedoc UI: https://joffrey-bion.github.io/livedoc/livedoc-ui