eng/packages/http-client-csharp-mgmt/docs/emitter.md
tsp compile . --emit=@azure-typespec/http-client-csharp-mgmt
emit:
- '@azure-typespec/http-client-csharp-mgmt'
The config can be extended with options as follows:
emit:
- '@azure-typespec/http-client-csharp-mgmt'
options:
'@azure-typespec/http-client-csharp-mgmt':
option: value
api-versionType: string
For TypeSpec files using the @versioned decorator, set this option to the version that should be used to generate against.
generate-protocol-methodsType: boolean
generate-convenience-methodsType: boolean
unreferenced-types-handlingType: "removeOrInternalize" | "internalize" | "keepAll"
Defines the strategy on how to handle unreferenced types. The default value is removeOrInternalize.
new-projectType: boolean
Set to true to overwrite the csproj if it already exists. The default value is false.
save-inputsType: boolean
Set to true to save the tspCodeModel.json and Configuration.json files that are emitted and used as inputs to the generator. The default value is false.
package-nameType: string
Define the package name. If not specified, the first namespace defined in the TypeSpec is used as the package name.
debugType: boolean
Set to true to automatically attempt to attach to a debugger when executing the C# generator. The default value is false.
logLevelType: "info" | "debug" | "verbose"
Set the log level. The default value is info.
disable-xml-docsType: boolean
Set to true to disable XML documentation generation. The default value is false.
generator-nameType: string
The name of the generator. By default this is set to ScmCodeModelGenerator. Generator authors can set this to the name of a generator that inherits from ScmCodeModelGenerator.
emitter-extension-pathType: string
Allows emitter authors to specify the path to a custom emitter package, allowing you to extend the emitter behavior. This should be set to import.meta.url if you are using a custom emitter.
update-code-modelType: object
Allows emitter authors to specify a custom function to modify the generated code model before emitting. This is useful for modifying the code model before it is passed to the generator.
licenseType: object
License information for the generated client code.
sdk-context-optionsType: object
The SDK context options that implement the CreateSdkContextOptions interface from the @azure-tools/typespec-client-generator-core package to be used by the CSharp emitter.
namespaceType: string
The C# namespace to use for the generated code. This will override the TypeSpec namespaces.
model-namespaceType: boolean
Whether to put models under a separate 'Models' sub-namespace. This only applies if the 'namespace' option is set. The default value is 'false'.