-
-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use @sample block tags in KDoc to embed samples inside the API #624
Comments
@uzilan I had this on my roadmap but didn't find the time to look deeper into it. Note that the samples in README are generated via ReadmeSpec but they have a different goal I would say as they serve to demonstrate the error message as well. A sample per function in KDoc would be great. Last time I had a look, the samples for |
@robstoll the samples in the kotlin std lib can be found under kotlin/libraries/stdlib/samples/test/samples/ so I guess it's sorted. I'd like to help adding the |
Sounds good and nice that you want to improve Atrium here 👍 The samples folder is not the right place, those are sample projects which one can copy as a start. |
Ok cool, I'll give it a try. |
@uzilan I had a look by myself in the meantime. I am going to create dedicated issues per file. Therefore I am closing this issue. Would be nice if you could contribute some of the samples. |
@robstoll sure, I also started a bit but got stuck because I couldn't get Dokka to include the samples. Maybe you have an idea how to solve it? |
Platform (all, jvm, js, android): all
Extension (none, kotlin 1.3): none
Code related feature
Non-Code related feature
Is your feature request related to a problem? Please describe.
Looking at the Atrium documentation, it is not always simple to understand how to use certain assertions, especially if they are complex. An example might make life easier.
Describe the solution you'd like
the @sample block tag could be used in the API documentation to refer to the samples in the sample projects. Those samples will then be included in the project's documentation and will make it easier for users of Atrium to see how to use the various assertions by looking at samples rather than trying to understanding the specifications.
The Kotlin standard library is using those @sample block tags extensively and have asked for help adding samples to make the API easier. I think it's a great way to help users understand the API and since you already have samples in the Atrium project it should be easy enough to simply refer to them using @sample.
The text was updated successfully, but these errors were encountered: