Skip to content

Commit 6d4dc5d

Browse files
raych1Copilot
andauthored
[Openapi-Diff] Bump autorest to ^3.8.0 and fix stderr handling (#459)
* Bump autorest to ^3.8.0 and fix stderr handling - Only throw on non-zero exit code; log stderr as warning otherwise - autorest 3.8.0 emits deprecation message to stderr with exit code 0 - Bump version to 0.12.4 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * resolved review feedback --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 10d8f0d commit 6d4dc5d

4 files changed

Lines changed: 22 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.12.4 2026-03-13
4+
5+
- Only throw error on AutoRest stderr when exit code is non-zero; log warnings otherwise
6+
37
# 0.12.3 2025-10-13
48

59
- Fix crash in logging when property named "$ref"

package-lock.json

Lines changed: 14 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@azure/oad",
3-
"version": "0.12.3",
3+
"version": "0.12.4",
44
"author": {
55
"name": "Microsoft Corporation",
66
"email": "azsdkteam@microsoft.com",
@@ -15,7 +15,7 @@
1515
"@ts-common/json-parser": "0.9.0",
1616
"@ts-common/source-map": "0.5.0",
1717
"@ts-common/string-map": "0.3.0",
18-
"autorest": "^3.6.1",
18+
"autorest": "^3.8.0",
1919
"js-yaml": "^4.1.0",
2020
"json-pointer": "0.6.2",
2121
"json-refs": "^3.0.15",

src/lib/validators/openApiDiff.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ export class OpenApiDiff {
250250
env: { ...process.env, NODE_OPTIONS: "--max-old-space-size=8192" }
251251
})
252252
if (stderr) {
253-
throw new Error(stderr)
253+
// autorest 3.8.0 emits deprecation message to stderr with exit code 0
254+
log.debug(`AutoRest completed with warnings on stderr: ${stderr}`)
254255
}
255256

256257
const buffer = await asyncFs.readFile(outputMapFilePath)

0 commit comments

Comments
 (0)