From bb5f8445d68fa5babec4d8c5fad1394368eb0baf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 2 Nov 2026 00:28:05 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...r.ExternalUsers.JsonSerializerContext.g.cs | 109 +++++++++++++ .../OpenRouter.ExternalUsersClient.g.cs | 3 +- .../OpenRouter.IExternalUsersClient.g.cs | 1 + .../OpenRouter.IOpenRouterClient.g.cs | 2 +- .../OpenRouter.OpenRouterClient.g.cs | 2 +- src/libs/OpenRouter/openapi.yaml | 152 +++++++++--------- 6 files changed, 188 insertions(+), 81 deletions(-) create mode 100644 src/libs/OpenRouter/Generated/OpenRouter.ExternalUsers.JsonSerializerContext.g.cs diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ExternalUsers.JsonSerializerContext.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ExternalUsers.JsonSerializerContext.g.cs new file mode 100644 index 00000000..1ad26cbe --- /dev/null +++ b/src/libs/OpenRouter/Generated/OpenRouter.ExternalUsers.JsonSerializerContext.g.cs @@ -0,0 +1,109 @@ + +#nullable enable + +namespace OpenRouter +{ /// + /// + /// + public sealed partial class ExternalUsersSourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext + { + private static readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver Resolver = new LazyChunkResolver(); + + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + internal static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver TypeInfoResolver => Resolver; + + + private static readonly global::System.Text.Json.JsonSerializerOptions DefaultOptions = CreateDefaultOptions(); + + /// + /// + /// + public static ExternalUsersSourceGenerationContext Default { get; } = new(DefaultOptions); + + private ExternalUsersSourceGenerationContext(global::System.Text.Json.JsonSerializerOptions options) + : base(options) + { + } + + /// + protected override global::System.Text.Json.JsonSerializerOptions? GeneratedSerializerOptions => DefaultOptions; + + /// + public override global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo(global::System.Type type) + { + return Resolver.GetTypeInfo(type, Options); + } + + /// + /// Adds this package's converters to . + /// + /// + /// A converter has to be on the options a chained resolver builds its JsonTypeInfo against, + /// and a context resolves types from every package below it. Each package contributes only + /// what it owns and calls down the chain for the rest, so the family's converter table is + /// written once rather than copied into all of them. + /// + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public static void AddConverters(global::System.Text.Json.JsonSerializerOptions options) + { + global::OpenRouter.SourceGenerationContext.AddConverters(options); + } + + private static global::System.Text.Json.JsonSerializerOptions CreateDefaultOptions() + { + var options = new global::System.Text.Json.JsonSerializerOptions + { + DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + TypeInfoResolver = Resolver, + }; + AddConverters(options); + + return options; + } + + private sealed class LazyChunkResolver : global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver + { + private readonly object _gate = new(); + private readonly global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[] _resolvers = new global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver?[1]; + + public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo? GetTypeInfo( + global::System.Type type, + global::System.Text.Json.JsonSerializerOptions options) + { + for (var index = 0; index < _resolvers.Length; index++) + { + var typeInfo = GetResolver(index).GetTypeInfo(type, options); + if (typeInfo is not null) + { + return typeInfo; + } + } + + return null; + } + + private global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver GetResolver(int index) + { + var resolver = global::System.Threading.Volatile.Read(ref _resolvers[index]); + if (resolver is not null) + { + return resolver; + } + + lock (_gate) + { + return _resolvers[index] ??= CreateResolver(index); + } + } + + private static global::System.Text.Json.Serialization.Metadata.IJsonTypeInfoResolver CreateResolver(int index) + { + return index switch + { + 0 => global::OpenRouter.SourceGenerationContext.TypeInfoResolver, + _ => throw new global::System.ArgumentOutOfRangeException(nameof(index)), + }; + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenRouter/Generated/OpenRouter.ExternalUsersClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.ExternalUsersClient.g.cs index c1e40afd..504ecc65 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.ExternalUsersClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.ExternalUsersClient.g.cs @@ -4,6 +4,7 @@ namespace OpenRouter { /// + /// External Users endpoints
/// If no httpClient is provided, a new one will be created.
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. ///
@@ -48,7 +49,7 @@ public sealed partial class ExternalUsersClient : global::OpenRouter.IExternalUs /// public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { - get => JsonSerializerContextProvider?.Value ?? global::OpenRouter.SourceGenerationContext.Default; + get => JsonSerializerContextProvider?.Value ?? global::OpenRouter.ExternalUsersSourceGenerationContext.Default; set => JsonSerializerContextProvider = new(() => value); } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.IExternalUsersClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.IExternalUsersClient.g.cs index 92809bf8..2c0a14d2 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.IExternalUsersClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.IExternalUsersClient.g.cs @@ -4,6 +4,7 @@ namespace OpenRouter { /// + /// External Users endpoints
/// If no httpClient is provided, a new one will be created.
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. ///
diff --git a/src/libs/OpenRouter/Generated/OpenRouter.IOpenRouterClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.IOpenRouterClient.g.cs index e9041678..24fb71fd 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.IOpenRouterClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.IOpenRouterClient.g.cs @@ -141,7 +141,7 @@ public partial interface IOpenRouterClient : global::System.IDisposable public EndpointsClient Endpoints { get; } /// - /// + /// External Users endpoints. /// public ExternalUsersClient ExternalUsers { get; } diff --git a/src/libs/OpenRouter/Generated/OpenRouter.OpenRouterClient.g.cs b/src/libs/OpenRouter/Generated/OpenRouter.OpenRouterClient.g.cs index 9bda971b..39983f50 100644 --- a/src/libs/OpenRouter/Generated/OpenRouter.OpenRouterClient.g.cs +++ b/src/libs/OpenRouter/Generated/OpenRouter.OpenRouterClient.g.cs @@ -209,7 +209,7 @@ public sealed partial class OpenRouterClient : global::OpenRouter.IOpenRouterCli }; /// - /// + /// External Users endpoints. /// public ExternalUsersClient ExternalUsers => new ExternalUsersClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { diff --git a/src/libs/OpenRouter/openapi.yaml b/src/libs/OpenRouter/openapi.yaml index ca913dec..49543ce8 100644 --- a/src/libs/OpenRouter/openapi.yaml +++ b/src/libs/OpenRouter/openapi.yaml @@ -12,6 +12,7 @@ "AppDisplayName": { "name": "X-OpenRouter-Title", "in": "header", + "x-speakeasy-name-override": "appTitle", "schema": { "type": "string" }, @@ -20,6 +21,7 @@ "AppCategories": { "name": "X-OpenRouter-Categories", "in": "header", + "x-speakeasy-name-override": "appCategories", "schema": { "type": "string" }, @@ -6983,7 +6985,8 @@ "type": "integer" }, "error": { - "$ref": "#/components/schemas/ResponsesErrorField" + "$ref": "#/components/schemas/ResponsesErrorField", + "nullable": true }, "frequency_penalty": { "format": "double", @@ -6996,22 +6999,26 @@ "type": "string" }, "incomplete_details": { - "$ref": "#/components/schemas/IncompleteDetails" + "$ref": "#/components/schemas/IncompleteDetails", + "nullable": true }, "instructions": { - "$ref": "#/components/schemas/BaseInputs" + "$ref": "#/components/schemas/BaseInputs", + "nullable": true }, "max_output_tokens": { "type": [ "integer", "null" - ] + ], + "nullable": true }, "max_tool_calls": { "type": [ "integer", "null" - ] + ], + "nullable": true }, "metadata": { "$ref": "#/components/schemas/RequestMetadata" @@ -7105,7 +7112,8 @@ "$ref": "#/components/schemas/PromptCacheOptions" }, "reasoning": { - "$ref": "#/components/schemas/BaseReasoningConfig" + "$ref": "#/components/schemas/BaseReasoningConfig", + "nullable": true }, "safety_identifier": { "type": [ @@ -7130,7 +7138,8 @@ ] }, "text": { - "$ref": "#/components/schemas/TextConfig" + "$ref": "#/components/schemas/TextConfig", + "nullable": true }, "tool_choice": { "$ref": "#/components/schemas/OpenAIResponsesToolChoice" @@ -7254,7 +7263,8 @@ "type": "array" }, "top_logprobs": { - "type": "integer" + "type": "integer", + "nullable": true }, "top_p": { "format": "double", @@ -7264,7 +7274,8 @@ ] }, "truncation": { - "$ref": "#/components/schemas/Truncation" + "$ref": "#/components/schemas/Truncation", + "nullable": true }, "usage": { "$ref": "#/components/schemas/OpenAIResponsesUsage" @@ -16384,28 +16395,32 @@ "type": [ "number", "null" - ] + ], + "nullable": true }, "presence_penalty": { "format": "double", "type": [ "number", "null" - ] + ], + "nullable": true }, "repetition_penalty": { "format": "double", "type": [ "number", "null" - ] + ], + "nullable": true }, "temperature": { "format": "double", "type": [ "number", "null" - ] + ], + "nullable": true }, "top_k": { "type": [ @@ -16418,7 +16433,8 @@ "type": [ "number", "null" - ] + ], + "nullable": true } }, "type": [ @@ -46826,7 +46842,8 @@ "type": [ "integer", "null" - ] + ], + "nullable": true }, "is_moderated": { "description": "Whether the top provider moderates content", @@ -46839,7 +46856,8 @@ "type": [ "integer", "null" - ] + ], + "nullable": true } }, "required": [ @@ -54975,8 +54993,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } }, { @@ -57378,8 +57395,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } } ], @@ -57836,8 +57852,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } } ], @@ -58619,8 +58634,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } }, { @@ -58973,8 +58987,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } }, { @@ -59123,9 +59136,9 @@ }, "summary": "List registered external users", "tags": [ - "External Users" + "External Users", + "End Users" ], - "x-speakeasy-group": "externalUsers", "x-speakeasy-name-override": "list", "x-speakeasy-pagination": { "inputs": [ @@ -59264,9 +59277,9 @@ }, "summary": "Register an external user", "tags": [ - "External Users" + "External Users", + "End Users" ], - "x-speakeasy-group": "externalUsers", "x-speakeasy-name-override": "create", "parameters": [] }, @@ -59373,9 +59386,9 @@ }, "summary": "Deactivate a registered external user", "tags": [ - "External Users" + "External Users", + "End Users" ], - "x-speakeasy-group": "externalUsers", "x-speakeasy-name-override": "delete" }, "get": { @@ -59499,9 +59512,9 @@ }, "summary": "Get a registered external user", "tags": [ - "External Users" + "External Users", + "End Users" ], - "x-speakeasy-group": "externalUsers", "x-speakeasy-name-override": "get" }, "patch": { @@ -59622,9 +59635,9 @@ }, "summary": "Update a registered external user", "tags": [ - "External Users" + "External Users", + "End Users" ], - "x-speakeasy-group": "externalUsers", "x-speakeasy-name-override": "update" }, "parameters": [ @@ -61360,8 +61373,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } }, { @@ -62111,8 +62123,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } }, { @@ -62565,8 +62576,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } }, { @@ -63008,8 +63018,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } }, { @@ -63187,8 +63196,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } }, { @@ -64343,8 +64351,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } }, { @@ -66722,8 +66729,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } }, { @@ -67713,8 +67719,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } }, { @@ -68166,8 +68171,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } }, { @@ -68918,8 +68922,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } }, { @@ -69384,8 +69387,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } }, { @@ -70348,8 +70350,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } }, { @@ -75085,8 +75086,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } }, { @@ -75728,8 +75728,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } }, { @@ -76430,8 +76429,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } }, { @@ -77148,8 +77146,7 @@ "example": 0, "maximum": 10000, "minimum": 0, - "type": "integer", - "nullable": false + "type": "integer" } } ], @@ -77505,8 +77502,7 @@ "example": 0, "maximum": 10000, "minimum": 0, - "type": "integer", - "nullable": false + "type": "integer" } } ], @@ -78898,8 +78894,7 @@ "example": 0, "maximum": 10000, "minimum": 0, - "type": "integer", - "nullable": false + "type": "integer" } } ], @@ -80516,8 +80511,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } }, { @@ -81232,8 +81226,7 @@ "type": [ "integer", "null" - ], - "nullable": false + ] } }, { @@ -82401,8 +82394,11 @@ }, { "name": "beta.responses", - "deprecated": true, - "description": "Deprecated alias for responses endpoints. Use responses instead. Scheduled for removal (sunset date TBD)." + "description": "Deprecated alias of responses. Use responses instead; scheduled for removal (sunset date TBD)." + }, + { + "name": "End Users", + "description": "Deprecated alias of externalUsers. Use externalUsers instead; scheduled for removal (sunset date TBD)." } ], "x-retry-strategy": {