Skip to content

code-model-v1 not created #5096

Description

@shivamverma-ms20

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<string> _queryParameters = new List<string>();`
	with 
	`            List<string> _queryParameters = new List<string> { "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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    AutoRest v2Related to AutoRest v2 CorequestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions