Open bog-dan-ro opened 5 years ago
Thanks bog-dan-ro.
Can you specify your wish? Do you want to call the API through the theme with HTTP requests? Like a prefilled mini postman?
I was thinking to something simpler, like this https://www.npmjs.com/package/raml2html-slate-theme theme. An optional call of the api trough the generated HTML will be a bonus ;)
Ok this would definitly be a nice feature and improve API work. I will take a look into that. I think the main complexity is the URI and Body generation. If we have that, it should be straight forward to have the curl command and also to send requests from within the template.
Thanks a lot!
The URI is quite easy, each RAML document should start like:
#%RAML 1.0
---
title: e-BookMobile API
baseUri: http://api.e-bookmobile.com/{version}
version: v1
So, you have the URI prefix (http://api.e-bookmobile.com/v1/
), then you just need to append every (sub)resource.
Body, you al ready generate it to show the examples, so, IMHO should not be a problem.
I'm currently working on a complete rewrite of the theme, switching from the nunjucks and materialize approach to an angular build. So the new theme will be written in angular, compiled to a single index.nunjucks file, that will be published on npm. This will bring a lot of improvements:
I really like your theme, IMHO the biggest missing feature is the cURL commands.