Add docs on authoring and using generator plugins for the C# emitter#10907
Open
Copilot wants to merge 6 commits into
Open
Add docs on authoring and using generator plugins for the C# emitter#10907Copilot wants to merge 6 commits into
Copilot wants to merge 6 commits into
Conversation
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add documentation for using plugins property in emitter
Add docs on authoring and using generator plugins for the C# emitter
Jun 5, 2026
commit: |
Contributor
|
No changes needing a change description found. |
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Contributor
Author
|
Applied the inline Correction: the change is in commit 201b792. |
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
jorgerangel-msft
approved these changes
Jun 5, 2026
|
You can try these changes here
|
JoshLove-msft
approved these changes
Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
pluginsemitter option (added in #10249) lets emitter authors load custom generator plugins, but there was no documentation describing how to author or use them. This adds a guide to the existingpackages/http-client-csharp/docs.Changes
docs/plugins.mdcovering:node_modulesdist) vs. explicit (via thepluginsoption).GeneratorPluginsubclass and theCodeModelGeneratorextension points (AddVisitor,AddRewriter,AddMetadataReference,AddSharedSourceDirectory), plus aLibraryVisitorexample..csprojthat references the generator via a NuGetPackageReferenceto the publishedMicrosoft.TypeSpec.Generator.ClientModelpackage (which transitively brings inMicrosoft.TypeSpec.Generator).tspconfig.yamlusage and path-resolution behavior (paths absolute or relative to the resolvedemitter-output-dir, auto-build of.csproj, DLL scanning).emitter.md—pluginsoption now links to the new guide and includes the inline path-resolution example.index.mdx— adds a "Generator plugins" section linking to the doc.emitter/src/options.ts— expanded thepluginsoption description to document path resolution (absolute or relative to the resolvedemitter-output-dir) with an inline YAML example, applying the inline examples from docs(http-client-csharp): document plugins option path resolution with examples #10908.readme.mdand website referenceemitter.md— regenerated to reflect the updated option description.Plugin authoring example:
Content was cross-checked against
GeneratorPlugin.cs,GeneratorHandler.cs,CodeModelGenerator.cs, and the emitteroptions.ts/emitter.ts.