Is there a way to include source code snippets in ...
# dokka
r
Is there a way to include source code snippets in Dokka? I’m working on a library and I really like the idea of having very rich API docs, however, I’m also super-paranoid of having broken code samples or it just being a chore to maintain as I evolve the API. I know ratpack.io does something like that with Javadocs but it’s a custom layer over the regular tooling.
s
Check how stdlib samples work, it basically a tests, and a samples at the same time
It uses @sample tag, combined with samples path passed to Dokka
r
Thanks. I was looking all over for that
@Sample
annotation and then found it’s a typealias for
@Test
! I have it working now.