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
Write examples directly to asciidoc #4043
Conversation
This commit replaces the AsciiDoc include in generated examples with the C# source code. Doing so also allows any examples to include callouts, similar to doc generation e.g. var deleteResponse = client.Delete<Tweet>(1, d => d .Index("twitter") .Routing("kimchy") // <1> Use a routing parameter ); will emit [source,csharp] ---- var deleteResponse = client.Delete<Tweet>(1, d => d .Index("twitter") .Routing("kimchy") //<1> ); ---- <1> Use a routing parameter
It might be good to add a notice/comment to the files now that these are generated and should not be edited directly. |
++ @nik9000, If these examples had a multine asciidoc comment in them, would that be an issue for the docs example build process, similar to what we do in the current .NET docs e.g. ////
IMPORTANT NOTE
==============
This file has been generated from <path to file>.
If you wish to submit a PR for any spelling mistakes, typos or grammatical errors for this file,
please modify the original csharp file found at the link and submit the PR with that change. Thanks!
//// |
@Mpdreamz I've added multiline comments that point back to the original file with line numbers, on GitHub. Would you mind taking another look, please? |
Awesome, lgtm 👍 |
With the change in elastic/elasticsearch-net#4043 to write C# examples directly to asciidoc, rather than use an include:: element, the src/Examples directory in elastic/elasticsearch-net no longer needs to be referenced. This commit removes the reference.
With the change in elastic/elasticsearch-net#4043 to write C# examples directly to asciidoc, rather than use an include:: element, the src/Examples directory in elastic/elasticsearch-net no longer needs to be referenced. This commit removes the reference.
This commit replaces the AsciiDoc include in generated examples with the C# source code.
Doing so also allows any examples to include callouts, similar to doc generation e.g.
will emit