Azure / Azure/typespec-azure

[Bug]: typespec-autorest - path parameter should be excluded from the schema of request/response body

Open
#2,040 3 comments 0 reactions 2 assignees Claimed by @markcowl View on GitHub
cli/psh needs-area
Dominant language
TypeScript
Stars
27
Forks
90
Avg merge
1d 22h
Merged PRs (30d)
156

Description

### Describe the bug

For example, in tsp of AzureFleet.Management, we have **name** as path parameter. See [here](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/azurefleet/AzureFleet.Management/virtualMachineScaleSet.tsp#L18-L23) for details.

We should exclude the path parameter **name** from the schema definition [virtualMachineScaleSet](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/azurefleet/resource-manager/Microsoft.AzureFleet/stable/2024-11-01/azurefleet.json#L2746-L2750) for request/response body.

### Reproduction

An example has been provided above.

### Checklist

- [x] Follow our [Code of Conduct](https://github.com/azure/typespec-azure/blob/main/CODE_OF_CONDUCT.md)
- [x] Check that this issue is about the Azure libraries for typespec. For bug in the typespec language or core libraries file it in the [TypeSpec repo](https://github.com/Microsoft/TypeSpec/issues/new/choose)
- [x] Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
- [x] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.