Skip to content

Commit 7cc5ec8

Browse files
build: bump to latest generator version
1 parent 2237506 commit 7cc5ec8

File tree

317 files changed

+33220
-35790
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

317 files changed

+33220
-35790
lines changed

codegen/generator/src/OpenAI.Library.Plugin.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.TypeSpec.Generator.ClientModel" Version="1.0.0-alpha.20250722.1" />
11+
<PackageReference Include="Microsoft.TypeSpec.Generator.ClientModel" Version="1.0.0-alpha.20250825.4" />
1212
</ItemGroup>
1313

1414
<!-- Copy output to package dist path for local execution and -->

codegen/generator/src/OpenAILibraryGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace OpenAILibraryPlugin
1111
public class OpenAILibraryGenerator : ScmCodeModelGenerator
1212
{
1313
private static OpenAILibraryGenerator? s_instance;
14-
internal static OpenAILibraryGenerator Instance => s_instance ?? throw new InvalidOperationException("OpenAILibraryGenerator was not initialized.");
14+
internal static new OpenAILibraryGenerator Instance => s_instance ?? throw new InvalidOperationException("OpenAILibraryGenerator was not initialized.");
1515

1616
[ImportingConstructor]
1717
public OpenAILibraryGenerator(GeneratorContext context) : base(context)

codegen/generator/src/Visitors/ContentInnerCollectionDefinedVisitor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class ContentInnerCollectionDefinedVisitor : ScmLibraryVisitor
1717
{
1818
private const string Comment = "Plugin customization: add Content.IsInnerCollectionDefined() check";
1919

20-
protected override MethodProvider VisitMethod(MethodProvider method)
20+
protected override MethodProvider? VisitMethod(MethodProvider method)
2121
{
2222
if (method.Signature.Name != "JsonModelWriteCore"
2323
|| method.BodyStatements is not MethodBodyStatements methodBodyStatements)

codegen/generator/src/Visitors/ExplicitConversionFromClientResultVisitor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace OpenAILibraryPlugin.Visitors;
1010
/// </summary>
1111
public class ExplicitConversionFromClientResultVisitor : ScmLibraryVisitor
1212
{
13-
protected override MethodProvider VisitMethod(MethodProvider method)
13+
protected override MethodProvider? VisitMethod(MethodProvider method)
1414
{
1515
if (method.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Explicit) &&
1616
method.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Operator) &&

codegen/generator/src/Visitors/ImplicitConversionToBinaryContentVisitor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace OpenAILibraryPlugin.Visitors;
99
/// </summary>
1010
public class ImplicitConversionToBinaryContentVisitor : ScmLibraryVisitor
1111
{
12-
protected override MethodProvider VisitMethod(MethodProvider method)
12+
protected override MethodProvider? VisitMethod(MethodProvider method)
1313
{
1414
if (method.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Implicit) &&
1515
method.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Operator) &&

codegen/generator/src/Visitors/PageOrderRemovalVisitor.cs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,23 +99,20 @@ private static InputParameter CreateSyntheticPageOrderInputParameter()
9999
additionalProperties: null,
100100
modelAsStruct: true,
101101
serializationOptions: new());
102-
return new InputParameter(
102+
return new InputQueryParameter(
103103
name: "order",
104-
nameInRequest: "order",
104+
serializedName: "order",
105105
summary: "",
106106
doc: "",
107-
inputModelType,
108-
InputRequestLocation.Query,
107+
type: inputModelType,
109108
defaultValue: null,
110-
InputParameterKind.Spread,
109+
scope: InputParameterScope.Spread,
111110
isRequired: false,
111+
isReadOnly: false,
112112
isApiVersion: false,
113-
isContentType: false,
114-
isEndpoint: false,
115-
skipUrlEncoding: false,
116113
explode: true,
117-
arraySerializationDelimiter: null,
118-
headerCollectionPrefix: null,
119-
serverUrlTemplate: null);
114+
access: null,
115+
collectionFormat: null,
116+
arraySerializationDelimiter: null);
120117
}
121118
}

codegen/generator/src/Visitors/PaginationVisitor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ private bool TryHandleGetRawPagesAsyncMethod(MethodProvider method)
205205
if (binaryExpr.Left is VariableExpression leftVar &&
206206
leftVar.Declaration.RequestedName == "nextToken" &&
207207
binaryExpr.Right is KeywordExpression rightKeyword &&
208-
rightKeyword.Keyword == "null")
208+
rightKeyword.Keyword == "null"
209+
&& hasMoreVariable != null)
209210
{
210211
// Create "!hasMore" condition. Note the hasMoreVariable gets assigned earlier in the method statements
211212
// in the WhileStatement handler below.

codegen/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@
2929
],
3030
"dependencies": {
3131
"@open-ai/plugin": "file:",
32-
"@azure-tools/typespec-client-generator-core": "0.57.2",
33-
"@azure-tools/typespec-azure-core": "0.57.0",
34-
"@typespec/http-client-csharp": "1.0.0-alpha.20250722.1",
35-
"@typespec/http": "1.1.0",
36-
"@typespec/openapi": "1.1.0"
32+
"@azure-tools/typespec-client-generator-core": "0.59.0",
33+
"@azure-tools/typespec-azure-core": "0.59.0",
34+
"@typespec/http-client-csharp": "1.0.0-alpha.20250825.4",
35+
"@typespec/http": "1.3.0",
36+
"@typespec/openapi": "1.3.0"
3737
},
3838
"devDependencies": {
3939
"@types/node": "^22.8.1",

0 commit comments

Comments
 (0)