Skip to content

Generate C# language examples via the .NET request converter - #6509

Open
flobernd wants to merge 1 commit into
mainfrom
csharp-language-examples
Open

Generate C# language examples via the .NET request converter#6509
flobernd wants to merge 1 commit into
mainfrom
csharp-language-examples

Conversation

@flobernd

@flobernd flobernd commented Jul 23, 2026

Copy link
Copy Markdown
Member

Summary

Wires C# into the language-examples generation, side by side with Python, JavaScript, Ruby, PHP, curl, and Java. docs/examples/generate-language-examples.js converts request examples to C# through @elastic/request-converter's new csharp format (elastic/request-converter#107), backed by the @elastic/request-converter-dotnet WASM bundle (elastic/elasticsearch-net#8931). The regenerated languageExamples.json is deliberately not part of this PR; the C# entries land in a follow-up once the converter packages are published.

Changes

  • 'C#' added to LANGUAGES. C# conversion is best-effort: a failed conversion skips that example's C# entry and is reported in an end-of-run summary instead of aborting, because the .NET converter has known endpoint coverage gaps. The other languages keep their fail-fast behavior.
  • @elastic/request-converter-dotnet (~9.5.0) added to docs/examples/package.json; the Makefile's generate-language-examples target updates it together with @elastic/request-converter.

Notes

  • There is no CI automation for languageExamples.json: the generate.yml workflow rebuilds output/ but never runs generate-language-examples, which remains a manual Makefile target. A full local dry run against locally built converter packages converted 649 of 761 request examples (112 skipped: 96 unsupported endpoints, 16 conversion issues); generated examples use fluent descriptor syntax with an illustrative MyDocument document type.
  • package-lock.json is intentionally untouched: the dotnet package is published from Add CI and npm packaging for the request converter elasticsearch-net#8931, and the lockfile refresh must follow the first publish.

@github-actions

Copy link
Copy Markdown
Contributor

Following you can find the validation changes against the target branch for the APIs.

No changes detected.

You can validate these APIs yourself by using the make validate target.

@flobernd
flobernd force-pushed the csharp-language-examples branch from 039619d to f31a4f6 Compare July 29, 2026 15:14
@flobernd
flobernd requested review from a team and l-trotta July 29, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation enhancement skip-backport This pull request should not be backported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant