Azure / Azure/azure-sdk-tools

[Breaking Change] Rule "ReferenceRedirection" treats "$ref" and equivalent primitive type as incompatible

Open
#7,272 0 comments 0 reactions 1 assignee Claimed by @mikeharder 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

In https://github.com/Azure/azure-rest-api-specs/pull/26658, check "Swagger BreakingChange" seems to think a "$ref" and the equivalent primitive type are incompatible:

![image](https://github.com/Azure/azure-sdk-tools/assets/9459391/25e9cdc1-c87d-4325-becc-ac5a899b8b7b)

```
// from
"properties": {
"kind": {
"type": "string",
"description": "The type discriminator describing a sub-type of QueueSelectorAttachment"
}
},

// to
"properties": {
"kind": {
"$ref": "#/definitions/QueueSelectorAttachmentKind",
"description": "The type discriminator describing a sub-type of QueueSelectorAttachment"
}
},

"QueueSelectorAttachmentKind": {
"type": "string",
"enum": [ "conditional", ... ],
"x-ms-enum": { "modelAsString": true,
```

Related: #7271

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.