crisp-oss / chappe

🧑‍💻 Developer Docs builder. Write guides in Markdown and references in API Blueprint. Comes with a built-in search engine.
https://www.npmjs.com/package/chappe
MIT License
206 stars 29 forks source link

Support for headers on request #5

Open arturo-ojeda opened 2 years ago

arturo-ojeda commented 2 years ago

Hi

Does Chappe support request headers?

I tried adding them in different ways but could not make it work

One example: https://cln.sh/AZKicvAzGw7f9QsWWpR0

They are supported by API Blueprint but not working for Chappe.

I'll be glad to add them as a contribution but first I want to make sure

Thanks

valeriansaliou commented 2 years ago

Hey Arturo!

You're right, we don't support them yet. I'm open for PRs on this!

All Blueprint parsing is done from there: https://github.com/crisp-oss/chappe/blob/master/res/plugins/gulp/jade-templates.js#L491 (during the Gulp build).

You're looking to debug the output of the Blueprint parser, and assign the parsed Headers from the raw Blueprint parser output to the template data object.

Thanks!

arturo-ojeda commented 2 years ago

Awesome, thanks for providing additional details. Will work on it 👋🏻

Bruno-Meowtel commented 2 years ago

This would actually be super helpful! @arturo-ojeda, were you able to implement this feature?

arturo-ojeda commented 2 years ago

I started doing it but got stuck and had to finish other things. I may continue with this in the next weeks 😅