Azure / Azure/azure-sdk-tools

AutoRest Runtime Error in breaking change: "Missing required property: name" for x-ms-enum

Open
#7,914 0 comments 0 reactions 1 assignee Claimed by @konrad-jamrozik View on GitHub
Breaking Changes Central-EngSys Spec PR Tools
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
143

Description

This issue is to aggregate and summarize various information talking about the same underlying problem.

### Reported cases

Recent occurrence reported by Jeffrey R. over email (3/18/2024):
- https://github.com/Azure/azure-rest-api-specs/pull/28080
- https://github.com/Azure/azure-rest-api-specs/pull/28080/checks
- https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3606445&view=logs&j=98f87804-8e1f-5655-af02-e80aefa7aa97

Recent independent report by a user (2/26/2024):
- https://github.com/Azure/azure-sdk-tools/issues/7749
6169#issuecomment-1659245003
- https://github.com/Azure/azure-rest-api-specs/pull/27895
- https://github.com/Azure/azure-rest-api-specs/pull/27895/checks
- https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3522379&view=logs&j=98f87804-8e1f-5655-af02-e80aefa7aa97

Old occurrence, discovered long time ago (7/31/2024):
- https://github.com/Azure/azure-sdk-tools/issues/6169#issuecomment-1659245003

### Root-cause

The problem likely stems from the tooling depending on legacy version using obsolete schema. Details here (albeit coming from **LintDiff, not Breaking Change check / oad / openapi-diff**):
- [Comment by Timothee G](https://github.com/Azure/azure-sdk-tools/issues/7755#issuecomment-1965437634)
- [Teams post by Mark C](https://teams.microsoft.com/l/message/19:906c1efbbec54dc8949ac736633e6bdf@thread.skype/1708551205018?tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47&groupId=3e17dcb0-4257-4a30-b843-77f47f1d4121&parentMessageId=1708550459988&teamName=Azure%20SDK&channelName=TypeSpec%20Discussion&createdTime=1708551205018)
- Sourced from https://github.com/Azure/azure-sdk-tools/issues/7755#issue-2155193720
- Quote:
> It kind of isn't correct, because x-ms-enum schema no longer requires a name, however, that check uses an older version of autorest, which is why it has the violation.

### Solution

Our work towards fixing the problem:
- https://github.com/Azure/openapi-diff/issues/294
- https://github.com/Azure/autorest/pull/4916
- https://github.com/Azure/openapi-diff/pull/302

### Additional context

See email thread `Re: Parsing breaking change checks AutoRest errors that denote issues with the spec itself, not the tooling`

### Related work

Related work for a fix in LintDiff (**as opposed to** breaking change check / openapi-diff):
- https://github.com/Azure/azure-sdk-tools/issues/7755

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.