diff --git a/codegen/generator/src/OpenAI.Library.Plugin.csproj b/codegen/generator/src/OpenAI.Library.Plugin.csproj index 27dd54f8..97bf3bd1 100644 --- a/codegen/generator/src/OpenAI.Library.Plugin.csproj +++ b/codegen/generator/src/OpenAI.Library.Plugin.csproj @@ -8,7 +8,7 @@ - + diff --git a/codegen/generator/src/Visitors/ExperimentalAttributeVisitor.cs b/codegen/generator/src/Visitors/ExperimentalAttributeVisitor.cs index a0c5fbe1..8b095979 100644 --- a/codegen/generator/src/Visitors/ExperimentalAttributeVisitor.cs +++ b/codegen/generator/src/Visitors/ExperimentalAttributeVisitor.cs @@ -664,8 +664,8 @@ public class ExperimentalAttributeVisitor : ScmLibraryVisitor if (!_stableMethods.Contains(lookupName)) { - methodProvider.Update( - attributes: [.. methodProvider.Attributes, + methodProvider.Signature.Update( + attributes: [.. methodProvider.Signature.Attributes, methodProvider.EnclosingType.Type.Namespace.StartsWith(_realtimeNamespace) || (methodProvider.Signature.ReturnType?.Namespace.StartsWith(_realtimeNamespace) ?? false) ? _experimental002Attribute : _experimental001Attribute]); diff --git a/codegen/package.json b/codegen/package.json index f3e6a5b6..dd68766b 100644 --- a/codegen/package.json +++ b/codegen/package.json @@ -31,7 +31,7 @@ "@open-ai/plugin": "file:", "@azure-tools/typespec-client-generator-core": "0.59.0", "@azure-tools/typespec-azure-core": "0.59.0", - "@typespec/http-client-csharp": "1.0.0-alpha.20250829.4", + "@typespec/http-client-csharp": "1.0.0-alpha.20250903.1", "@typespec/http": "1.3.0", "@typespec/openapi": "1.3.0" }, diff --git a/package-lock.json b/package-lock.json index 627915e7..1b2fd17f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "@azure-tools/typespec-client-generator-core": "0.59.0", "@open-ai/plugin": "file:", "@typespec/http": "1.3.0", - "@typespec/http-client-csharp": "1.0.0-alpha.20250829.4", + "@typespec/http-client-csharp": "1.0.0-alpha.20250903.1", "@typespec/openapi": "1.3.0" }, "devDependencies": { @@ -1531,9 +1531,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "1.0.0-alpha.20250829.4", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250829.4.tgz", - "integrity": "sha512-SxOwdLrI5sJ4dPC3j0jLn5DQHQg0g4qm5q4cZCsLMzHbT1Jiio5Z8kDZWlx9UrhfGeNaJ53WWHcccXKowlFw/A==", + "version": "1.0.0-alpha.20250903.1", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250903.1.tgz", + "integrity": "sha512-W3vbpxUhVJYBSoYPE4seMsDp/nvcqEwxsuYjVxBWMDliOOtO8ED05PYLvY5N4h+vKF2j30iT2d23NqpPo2qxeA==", "license": "MIT", "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.59.0 <0.60.0 || ~0.60.0-0", diff --git a/scripts/Invoke-CodeGen.ps1 b/scripts/Invoke-CodeGen.ps1 index 16696181..83fb5108 100644 --- a/scripts/Invoke-CodeGen.ps1 +++ b/scripts/Invoke-CodeGen.ps1 @@ -269,10 +269,17 @@ Push-Location $repoRootPath try { Invoke-ScriptWithLogging { npm ci } + if ($LASTEXITCODE -ne 0) { + exit $LASTEXITCODE + } + Invoke-ScriptWithLogging { npm run build -w $codegenFolderPath } + if ($LASTEXITCODE -ne 0) { + exit $LASTEXITCODE + } Set-Location $specificationFolderPath - Invoke-ScriptWithLogging { npm exec --no -- tsp compile . } + Invoke-ScriptWithLogging { npx tsp compile . --trace @typespec/http-client-csharp } } finally { Pop-Location