# API documentation

**URL:** <https://forum.crystal-lang.org/t/api-documentation/6996>\
**Category:** Community\
**Tags:** rfc\
**Created:** [July 6, 2024, 5:31am UTC](https://forum.crystal-lang.org/t/api-documentation/6996 "2024-07-06T05:31:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karl-Goethebier](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/karl-goethebier/32/2579_2.png) [@Karl-Goethebier](https://forum.crystal-lang.org/u/Karl-Goethebier)\
**Post date:** [July 6, 2024, 5:31am UTC](https://forum.crystal-lang.org/t/api-documentation/6996/1 "2024-07-06T05:31:13Z")

</div>

It would certainly be very helpful and would serve the further dissemination of the language if the API documentation had even more code examples. I am aware that this is a lot of work.

An interesting approach is taken by [clojuredocs](https://clojuredocs.org/) where users can contribute to the documentation themselves with examples.

The solution from [perldoc](https://perldoc.perl.org/) is also very good.

For further inspiration see also [The Common Lisp Cookbook](https://lispcookbook.github.io/cl-cookbook/). (OK, a cookbook is a different thing…)

Regards, Karl

---

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/blacksmoke16/32/1241_2.png) [@Blacksmoke16](https://forum.crystal-lang.org/u/Blacksmoke16)\
**Post date:** [July 6, 2024, 12:51pm UTC](https://forum.crystal-lang.org/t/api-documentation/6996/2 "2024-07-06T12:51:12Z")

</div>

> [@Karl-Goethebier](#):
>
> where users can contribute to the documentation themselves with examples.

They already can by opening a PR :) I’m sure contributions to add examples to methods that do not currently have them would be welcomed. Or to add additional relevant examples to the existing ones.

I’m unsure if it would be a good idea to allow _anyone_ to contribute arbitrary examples/notes without review. Mainly as having the examples in the source code is a big win versus something like the clojure docs where it would have to be some external system to handle it.
