Expose all of lout's data as JSON in addition to HTML #131
Comments
There's a slight difficulty here since there's no precaution to filter out important/sensitive data but I agree it's something we want. |
How about creating a module which would create a json object, and then other modules like lout could use it as a base? Similarly to good and good reporters. I'm planning to build a documentation tool as well, so I would definitely be interested in a base module like this. |
Why do your own ? Is your scope that far from lout ? |
I would say yes. Documenting only the properties is not enough for us. We also need to following:
We could add all this to lout, but since many things might be specific to our needs, I think it's easier to build it ourselves. If we had a module that could serve as a base (to generate the json data) we would just need to build a custom UI. |
Everything but the last could be done in lout with maybe a few tweaks to hapi and/or joi, lout doesn't prevent you from adding that last route aside. |
@Marsup while I understand your concern about security, I wouldn't want it to expose anything that wouldn't be visible in the HTML at I personally see no reason this would need to be a separate module. Perhaps even keep a single route, but respond with the data structure passed to the view if the request asks for |
I understand yes, the thing is I'm not sure we're not currently over-exposing data, handlebars shielding us from leaks, so it would have to be examined. |
Closing due to inactivity. |
I'd like to write my own clientside app to render the data that Lout produces in a more interactive way.
Though I could copy/paste it feels silly to maintain that as a separate project, would be awesome if in addition to
/docs
there was also a/docs/json
or something that just contained the JSON data dump of all the routing info that Lout gathers.The text was updated successfully, but these errors were encountered: