code-model-v1 not created
- Dominant language
- TypeSpec
- Stars
- 4.8k
- Forks
- 736
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 1
Description
I tried to generate ARM client files using swagger.json through autorest using
autorest readme.md --use:@microsoft.azure/autorest.csharp@2.3.82
readme.md:
```
### Prerequisites
1. Update the `swagger.json`. [See notes](#Swagger-notes).
2. Install AutoRest.
#Generate ARM client.
1. Navigate to \src\ServiceARMClient\client\v2025-03-30-preview
2. Run > `autorest --v3 readme.md --version=3.0.6274`
### Important notes
1. Update the swagger.son with meaningful operationId, as this will be backbone for the generated client method names.
2. In the generated client code replace,
` List _queryParameters = new List();`
with
` List _queryParameters = new List { "api-version=2024-03-03-preview" };`
# This is the configuration block for the Autorest.
``` yaml
# list all the input OpenAPI files (may be YAML, JSON, or Literate- OpenAPI markdown)
verbose: true
input-file: swagger.json
output-folder: Generated
clear-output-folder: true
csharp: true
namespace: Microsoft.Azure.ServiceClient.v2025_03_30_preview
azure-arm: true
license-header: "MICROSOFT_MIT_NO_VERSION"
legacy: true
```
The command created all the files and models but didn't generated code-model-v1, why so?
Contributor guide
Research direction
Start with readme.md and swagger.json, then reproduce the documented `autorest --v3 readme.md --version=3.0.6274` command. Inspect the generated output and command diagnostics to determine why `code-model-v1` is absent; done means identifying whether this is expected behavior or a configuration or generation failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100