From b0cb2f3e19e5aef2577082fe63d87111558e0c81 Mon Sep 17 00:00:00 2001 From: Timothee Guerin Date: Mon, 29 Jan 2024 15:46:07 -0800 Subject: [PATCH] Backmerge autorest 0.38.1 hotfix (#187) --- packages/samples/package.json | 2 +- packages/typespec-autorest/CHANGELOG.json | 12 ++++++++++++ packages/typespec-autorest/CHANGELOG.md | 9 ++++++++- packages/typespec-autorest/package.json | 2 +- packages/typespec-autorest/src/openapi.ts | 2 +- .../typespec-autorest/test/primitive-types.test.ts | 2 +- .../typespec-azure-playground-website/package.json | 2 +- .../typespec-azure-resource-manager/package.json | 4 ++-- packages/typespec-service-csharp/package.json | 4 ++-- pnpm-lock.yaml | 8 ++++---- 10 files changed, 33 insertions(+), 14 deletions(-) diff --git a/packages/samples/package.json b/packages/samples/package.json index 94be4e9837..7b48faa53c 100644 --- a/packages/samples/package.json +++ b/packages/samples/package.json @@ -45,7 +45,7 @@ "@typespec/http": "workspace:~0.52.0", "@typespec/rest": "workspace:~0.52.0", "@azure-tools/typespec-azure-core": "workspace:~0.38.0", - "@azure-tools/typespec-autorest": "workspace:~0.38.0", + "@azure-tools/typespec-autorest": "workspace:~0.38.1", "@azure-tools/typespec-azure-resource-manager": "workspace:~0.38.0", "@azure-tools/typespec-client-generator-core": "workspace:~0.38.0" }, diff --git a/packages/typespec-autorest/CHANGELOG.json b/packages/typespec-autorest/CHANGELOG.json index 6f720e8440..7dff809bd7 100644 --- a/packages/typespec-autorest/CHANGELOG.json +++ b/packages/typespec-autorest/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@azure-tools/typespec-autorest", "entries": [ + { + "version": "0.38.1", + "tag": "@azure-tools/typespec-autorest_v0.38.1", + "date": "Mon, 29 Jan 2024 22:16:39 GMT", + "comments": { + "patch": [ + { + "comment": "Fix: Autorest emitter should generated format: decimal" + } + ] + } + }, { "version": "0.38.0", "tag": "@azure-tools/typespec-autorest_v0.38.0", diff --git a/packages/typespec-autorest/CHANGELOG.md b/packages/typespec-autorest/CHANGELOG.md index 134a5750bc..5dceb5320c 100644 --- a/packages/typespec-autorest/CHANGELOG.md +++ b/packages/typespec-autorest/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @azure-tools/typespec-autorest -This log was last generated on Wed, 24 Jan 2024 05:47:18 GMT and should not be manually modified. +This log was last generated on Mon, 29 Jan 2024 22:16:39 GMT and should not be manually modified. + +## 0.38.1 +Mon, 29 Jan 2024 22:16:39 GMT + +### Patches + +- Fix: Autorest emitter should generated format: decimal ## 0.38.0 Wed, 24 Jan 2024 05:47:18 GMT diff --git a/packages/typespec-autorest/package.json b/packages/typespec-autorest/package.json index 3050c17c00..24c9432570 100644 --- a/packages/typespec-autorest/package.json +++ b/packages/typespec-autorest/package.json @@ -1,6 +1,6 @@ { "name": "@azure-tools/typespec-autorest", - "version": "0.38.0", + "version": "0.38.1", "author": "Microsoft Corporation", "description": "TypeSpec library for emitting openapi from the TypeSpec REST protocol binding", "homepage": "https://azure.github.io/typespec-azure", diff --git a/packages/typespec-autorest/src/openapi.ts b/packages/typespec-autorest/src/openapi.ts index 3f0d26ab6c..99935cd18b 100644 --- a/packages/typespec-autorest/src/openapi.ts +++ b/packages/typespec-autorest/src/openapi.ts @@ -2111,7 +2111,7 @@ function createOAPIEmitter(program: Program, options: ResolvedAutorestEmitterOpt case "decimal": return { type: "number", format: "decimal" }; case "decimal128": - return { type: "number", format: "decimal128" }; + return { type: "number", format: "decimal" }; case "string": return { type: "string" }; case "boolean": diff --git a/packages/typespec-autorest/test/primitive-types.test.ts b/packages/typespec-autorest/test/primitive-types.test.ts index cbe88ca6d0..f96ef46537 100644 --- a/packages/typespec-autorest/test/primitive-types.test.ts +++ b/packages/typespec-autorest/test/primitive-types.test.ts @@ -28,7 +28,7 @@ describe("typespec-autorest: primitives", () => { ["duration", { type: "string", format: "duration" }], ["bytes", { type: "string", format: "byte" }], ["decimal", { type: "number", format: "decimal" }], - ["decimal128", { type: "number", format: "decimal128" }], + ["decimal128", { type: "number", format: "decimal" }], ]; for (const test of cases) { diff --git a/packages/typespec-azure-playground-website/package.json b/packages/typespec-azure-playground-website/package.json index ef22c1fcd5..cc19d37f73 100644 --- a/packages/typespec-azure-playground-website/package.json +++ b/packages/typespec-azure-playground-website/package.json @@ -54,7 +54,7 @@ "@typespec/http": "workspace:~0.52.0", "@typespec/openapi": "workspace:~0.52.0", "@typespec/openapi3": "workspace:~0.52.0", - "@azure-tools/typespec-autorest": "workspace:~0.38.0", + "@azure-tools/typespec-autorest": "workspace:~0.38.1", "@azure-tools/typespec-azure-core": "workspace:~0.38.0", "@azure-tools/typespec-azure-resource-manager": "workspace:~0.38.0", "@azure-tools/typespec-client-generator-core": "workspace:~0.38.0", diff --git a/packages/typespec-azure-resource-manager/package.json b/packages/typespec-azure-resource-manager/package.json index 0c8dddba89..0f8cae25c8 100644 --- a/packages/typespec-azure-resource-manager/package.json +++ b/packages/typespec-azure-resource-manager/package.json @@ -54,7 +54,7 @@ "peerDependencies": { "@typespec/compiler": "workspace:~0.52.0", "@azure-tools/typespec-azure-core": "~0.38.0", - "@azure-tools/typespec-autorest": "~0.38.0", + "@azure-tools/typespec-autorest": "~0.38.1", "@typespec/openapi": "workspace:~0.52.0", "@typespec/rest": "workspace:~0.52.0", "@typespec/http": "workspace:~0.52.0", @@ -64,7 +64,7 @@ "@typespec/compiler": "workspace:~0.52.0", "@typespec/openapi": "workspace:~0.52.0", "@azure-tools/typespec-azure-core": "workspace:~0.38.0", - "@azure-tools/typespec-autorest": "workspace:~0.38.0", + "@azure-tools/typespec-autorest": "workspace:~0.38.1", "@typespec/rest": "workspace:~0.52.0", "@typespec/http": "workspace:~0.52.0", "@typespec/versioning": "workspace:~0.52.0", diff --git a/packages/typespec-service-csharp/package.json b/packages/typespec-service-csharp/package.json index ab7583a54d..a11ea126e3 100644 --- a/packages/typespec-service-csharp/package.json +++ b/packages/typespec-service-csharp/package.json @@ -49,7 +49,7 @@ "@typespec/rest": "workspace:~0.52.0", "@typespec/http": "workspace:~0.52.0", "@typespec/versioning": "workspace:~0.52.0", - "@azure-tools/typespec-autorest": "~0.38.0", + "@azure-tools/typespec-autorest": "~0.38.1", "@azure-tools/typespec-azure-core": "~0.38.0" }, "dependencies": { @@ -57,7 +57,7 @@ }, "devDependencies": { "@typespec/compiler": "workspace:~0.52.0", - "@azure-tools/typespec-autorest": "workspace:~0.38.0", + "@azure-tools/typespec-autorest": "workspace:~0.38.1", "@typespec/openapi": "workspace:~0.52.0", "@typespec/rest": "workspace:~0.52.0", "@typespec/http": "workspace:~0.52.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c1b2d8c925..f76eb9edba 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1554,7 +1554,7 @@ importers: packages/samples: dependencies: '@azure-tools/typespec-autorest': - specifier: workspace:~0.38.0 + specifier: workspace:~0.38.1 version: link:../typespec-autorest '@azure-tools/typespec-azure-core': specifier: workspace:~0.38.0 @@ -1741,7 +1741,7 @@ importers: packages/typespec-azure-playground-website: dependencies: '@azure-tools/typespec-autorest': - specifier: workspace:~0.38.0 + specifier: workspace:~0.38.1 version: link:../typespec-autorest '@azure-tools/typespec-azure-core': specifier: workspace:~0.38.0 @@ -1826,7 +1826,7 @@ importers: packages/typespec-azure-resource-manager: devDependencies: '@azure-tools/typespec-autorest': - specifier: workspace:~0.38.0 + specifier: workspace:~0.38.1 version: link:../typespec-autorest '@azure-tools/typespec-azure-core': specifier: workspace:~0.38.0 @@ -1960,7 +1960,7 @@ importers: version: 5.3.0 devDependencies: '@azure-tools/typespec-autorest': - specifier: workspace:~0.38.0 + specifier: workspace:~0.38.1 version: link:../typespec-autorest '@azure-tools/typespec-azure-core': specifier: workspace:~0.38.0