Azure / Azure/azure-rest-api-specs

[BUG] `Microsoft.Automation` - Spec breaking change after typespec migration

Open
#42,369 0 comments 0 reactions 0 assignees View on GitHub
Automation bug customer-reported Mgmt question Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

### API Spec link

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/openapi.json

### API Spec version

2024-10-23

### Describe the bug

Multiple operations had type changes in response objects or request parameters, this is causing problems in [`go-azure-sdk`](https://github.com/hashicorp/go-azure-sdk/) which is generated from the API spec.

Generally we would expect a migration to not contain any changes like this in existing API versions, this causes a lot of extra work on our end as we have to continuously fix and refactor both the SDK code as well as code in the [`azurerm`](https://github.com/hashicorp/terraform-provider-azurerm/) Terraform provider.

Examples of changes that are affecting us:
1. Runbook_GetContent
- [old](https://github.com/Azure/azure-rest-api-specs/blob/0f9539236cbea0cd9ca5dc0bde00d15a039fe22d/specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/runbook.json#L375-L381): response type `file`
- [new](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/openapi.json#L6615-L6618): response type `string`
2. RunbookDraft_GetContent
- [old](https://github.com/Azure/azure-rest-api-specs/blob/0f9539236cbea0cd9ca5dc0bde00d15a039fe22d/specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/runbook.json#L79-L85): response type `file`
- [new](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/openapi.json#L6731-L6737): response type `string`
3. RunbookDraft_ReplaceContent
- [old](https://github.com/Azure/azure-rest-api-specs/blob/0f9539236cbea0cd9ca5dc0bde00d15a039fe22d/specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/runbook.json#L130-L136): `runbookContent` type `file`
- [new](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/openapi.json#L6789-L6796): `runbookContent` type `string`

### Expected behavior

No type changes in released stable API versions

### Actual behavior

see description

### Reproduction Steps

N/A

### Environment

_No response_

Contributor guide

Open the contributing guide

Research direction

Compare the linked old runbook.json definitions with the current openapi.json for Runbook_GetContent, RunbookDraft_GetContent, and RunbookDraft_ReplaceContent. Check the 2024-10-23 stable specification for other migration-related type changes; done means released stable API versions preserve the original types.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api, backend-api-design
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.