Describe the bug
All warnings:
typespec/node_modules/@azure-tools/typespec-azure-core/lib/traits.tsp:147:20 - warning @typespec/http-server-csharp/anonymous-model: Inline models use generated names in emitted code. Consider defining each model with an explicit name. This model will be named 'Model0' in emitted code
> 147 | clientRequestId: {};
| ^^
typespec/node_modules/@azure-tools/typespec-azure-core/lib/traits.tsp:177:24 - warning @typespec/http-server-csharp/anonymous-model: Inline models use generated names in emitted code. Consider defining each model with an explicit name. This model will be named 'Model1' in emitted code
> 177 | conditionalRequests: {};
| ^^
typespec/node_modules/@azure-tools/typespec-azure-core/lib/traits.tsp:206:23 - warning @typespec/http-server-csharp/anonymous-model: Inline models use generated names in emitted code. Consider defining each model with an explicit name. This model will be named 'Model2' in emitted code
> 206 | repeatableRequests: {};
| ^^
Resulting C# class:
// Generated by @typespec/http-server-csharp
// <auto-generated />
#nullable enable
using System;
using System.Collections.Generic;
using System.Text.Json;
using TypeSpec.Helpers;
using TypeSpec.Helpers.JsonConverters;
namespace Microsoft.MyRpNamespace;
public partial class Model0 {}
Reproduction
- Use an ARM RP typespec
- Add the following to tspconfig.yaml
emit:
- "@typespec/http-server-csharp"
options:
"@typespec/http-server-csharp":
emitter-output-dir: "{project-root}/generated/{emitter-name}"
output-type: all
emit-mocks: none
overwrite: true
Checklist
Describe the bug
All warnings:
Resulting C# class:
Reproduction
Checklist