-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Code Snippets to Accompany Class Member Documentation #5765
Comments
@asthana86 @aditidugar @JRAlexander FYI on samples request for ML.NET API docs @dend for content that is auto-generated from /// comments, is it possible to add remarks and examples without losing them when docs get regenerated? |
Would something like the example tag work? |
Yes, this works @mitevpi but I'm wondering if we really wanna embed examples to APIs like that. |
@mairaw can it be done the similar way as it's done now for .NET API? |
@pkulikov .NET is kind of a special case because we can't auto-generate docs from source as other products can for a variety of reasons. So, for ML.NET we'd be following the same pattern that all others teams are using for reference docs including ASP.NET Core. I just need to learn now how to handle those (I think other teams are not really adding samples at the moment to the reference docs) considering some of the changes that the engineering team is planning for reference docs. |
@mairaw thank you very much for the reply as that makes things clearer to me. Then I have two follow-up questions:
Given that, the Edit buttons on the pages with ML.NET API look to be not useful, because clicking them results in a PR to dotnet/ml-api-docs repository |
Correct! @dend are we working on enabling folks to go directly to source when API docs are auto-generated?
Correct. (Sorry I missed that PR) Let me learn how this works and I'll remove the Edit button from those docs if they're not useful. |
Assigning this issue to myself to investigate next sprint. |
Moving this to the backlog. We need to sit down with @dend and understand how this works for auto-generated content. |
FYI @sfilipi. I believe you're already working on adding code samples, correct? |
Closing since this API no longer exists. /cc @natke |
Would it be possible to add brief code snippets underneath key methods/properties in order to quickly communicate usage/use cases?
I'd love to contribute if that's something that would be useful to others as well.
ex: In the case of the ColumnAttribute.Ordinal Property, if there was a "Code Sample" section right above/below the "Applies To" header, I think that would be very clear and helpful. The sample could be something as simple as what already exists in some of the tutorials/intros:
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: