Mermade / widdershins

OpenAPI / Swagger, AsyncAPI & Semoasa definitions to (re)Slate compatible markdown
https://mermade.github.io/reslate
MIT License
1.49k stars 322 forks source link

CODE SAMPLES ERROR WIDDERSHINS + SLATE #502

Open rminana opened 2 years ago

rminana commented 2 years ago

Description Code Samples (for example curl "api_endpoint_here" \ -H "Authorization: meowmeowmeow") with httpsnipets are not appearing on Slate. I use the widdershins API to convert the .json file to html.md , and for show on slate request examples (curl, request or unirest ). I use the config options.language_clients = [...], on my JS file, but no response is showed in slate, Although the language clients are visible on the markdown file generated config parameters on the header of the file, which I think it means that the configuration on the JS file was OK.

here is my JS file: image

To Reproduce Steps to reproduce the behavior:

  1. Once with the JS above is created, in CLI execute this for generate the markdown file : node Code.JS
  2. Then replace on my Slate/source directory the file index.html existing for this one called the same name
  3. Run docker with : docker run --rm --name slate -p 4567:4567 -v ${pwd}:/srv/slate/source slatedocs/slate serve
  4. My input file:

image

  1. See error: In the entire file doesn't appear a markdown code sample about how generate a curl response or somet index.html.md

Expected behavior It should appear on the right side of the web browser a request body parameter or something like the Slate demo shows:

curl "http://example.com/api/kittens" \ -H "Authorization: meowmeowmeow"

Screenshots

image image image

Versions: