fern-api / fern

Input OpenAPI. Output SDKs and Docs.
https://buildwithfern.com
MIT License
2.44k stars 117 forks source link

Docs Markdown Component for SDK/cURL snippets #2524

Open thesandlord opened 6 months ago

thesandlord commented 6 months ago

Problem description

In order to put code snippets into docs and guides, they need to be manually created in all supported languages and cURL. When the API changes, these need to be manually changed as well.

Describe the solution

Examples are already defined in the Fern definition. It would be great to just drop in the existing examples into the docs. These would always stay in sync with the Fern definition, and automatically create snippets for all supported Fern languages.

Why would it be useful?

Docs are more useful if explanation and code are side by side. This encourages more full featured docs to be written easily, and makes Fern a true all in one platform!

Rutledge commented 5 months ago

+1 We have examples in the github repos. It would be nice if these were available in the docs!