From bbfed14266d136ff95ffd6a56dc874bdc1dd5eed Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 9 Apr 2026 13:07:04 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...rClient.Authorizations.ApiKeyInHeader.g.cs | 1 + .../Serper/Generated/Serper.PathBuilder.g.cs | 34 ++++ .../Serper/Generated/Serper.Security.g.cs | 145 ++++++++++++++++++ ...rClient.Authorizations.ApiKeyInHeader.g.cs | 13 +- .../Serper.SerperClient.Autocomplete.g.cs | 29 +++- ...perClient.Constructors.ApiKeyInHeader.g.cs | 1 + .../Serper.SerperClient.ImageSearch.g.cs | 29 +++- .../Serper.SerperClient.NewsSearch.g.cs | 29 +++- .../Serper.SerperClient.PatentSearch.g.cs | 29 +++- .../Serper.SerperClient.PlacesSearch.g.cs | 29 +++- .../Serper.SerperClient.ScholarSearch.g.cs | 29 +++- .../Generated/Serper.SerperClient.Search.g.cs | 29 +++- .../Serper.SerperClient.ShoppingSearch.g.cs | 29 +++- .../Serper.SerperClient.VideoSearch.g.cs | 29 +++- .../Serper/Generated/Serper.SerperClient.g.cs | 2 +- 15 files changed, 437 insertions(+), 20 deletions(-) create mode 100644 src/libs/Serper/Generated/Serper.Security.g.cs diff --git a/src/libs/Serper/Generated/Serper.ISerperClient.Authorizations.ApiKeyInHeader.g.cs b/src/libs/Serper/Generated/Serper.ISerperClient.Authorizations.ApiKeyInHeader.g.cs index fe3f240..bb34e98 100644 --- a/src/libs/Serper/Generated/Serper.ISerperClient.Authorizations.ApiKeyInHeader.g.cs +++ b/src/libs/Serper/Generated/Serper.ISerperClient.Authorizations.ApiKeyInHeader.g.cs @@ -9,6 +9,7 @@ public partial interface ISerperClient /// Authorize using ApiKey authentication. /// /// + public void AuthorizeUsingApiKeyInHeader( string apiKey); } diff --git a/src/libs/Serper/Generated/Serper.PathBuilder.g.cs b/src/libs/Serper/Generated/Serper.PathBuilder.g.cs index 1648bef..513b733 100644 --- a/src/libs/Serper/Generated/Serper.PathBuilder.g.cs +++ b/src/libs/Serper/Generated/Serper.PathBuilder.g.cs @@ -224,6 +224,40 @@ public PathBuilder AddOptionalParameter( return this; } + /// + /// Adds a pre-serialized query string fragment to the URL. + /// + /// The serialized query string value. + /// The current instance. + public PathBuilder AddRawQueryString( + string value) + { + if (string.IsNullOrWhiteSpace(value)) + { + return this; + } + + value = value.TrimStart('?', '&'); + if (value.Length == 0) + { + return this; + } + + if (_firstParameter) + { + _stringBuilder.Append('?'); + _firstParameter = false; + } + else + { + _stringBuilder.Append('&'); + } + + _stringBuilder.Append(value); + + return this; + } + /// /// Returns the constructed URL as a string. /// diff --git a/src/libs/Serper/Generated/Serper.Security.g.cs b/src/libs/Serper/Generated/Serper.Security.g.cs new file mode 100644 index 0000000..89c48a2 --- /dev/null +++ b/src/libs/Serper/Generated/Serper.Security.g.cs @@ -0,0 +1,145 @@ +#nullable enable + +namespace Serper +{ + internal sealed class EndPointAuthorizationRequirement + { + internal string Type { get; set; } = string.Empty; + + internal string Location { get; set; } = string.Empty; + + internal string Name { get; set; } = string.Empty; + + internal string FriendlyName { get; set; } = string.Empty; + } + + internal sealed class EndPointSecurityRequirement + { + internal global::System.Collections.Generic.IReadOnlyList Authorizations { get; set; } = + global::System.Array.Empty(); + } + + internal static class EndPointSecurityResolver + { + internal static global::System.Collections.Generic.List ResolveAuthorizations( + global::System.Collections.Generic.IReadOnlyList availableAuthorizations, + global::System.Collections.Generic.IReadOnlyList securityRequirements, + string operationName) + { + availableAuthorizations = availableAuthorizations ?? throw new global::System.ArgumentNullException(nameof(availableAuthorizations)); + securityRequirements = securityRequirements ?? throw new global::System.ArgumentNullException(nameof(securityRequirements)); + operationName = operationName ?? throw new global::System.ArgumentNullException(nameof(operationName)); + + if (securityRequirements.Count == 0) + { + return new global::System.Collections.Generic.List(); + } + + var allowsAnonymous = false; + + foreach (var requirement in securityRequirements) + { + if (requirement.Authorizations.Count == 0) + { + allowsAnonymous = true; + continue; + } + + var selected = new global::System.Collections.Generic.List(requirement.Authorizations.Count); + var satisfied = true; + + foreach (var requiredAuthorization in requirement.Authorizations) + { + var found = false; + + for (var i = 0; i < availableAuthorizations.Count; i++) + { + if (!Matches(availableAuthorizations[i], requiredAuthorization)) + { + continue; + } + + selected.Add(availableAuthorizations[i]); + found = true; + break; + } + + if (!found) + { + satisfied = false; + break; + } + } + + if (satisfied) + { + return selected; + } + } + + if (allowsAnonymous) + { + return new global::System.Collections.Generic.List(); + } + + throw new global::System.InvalidOperationException( + $"Operation '{operationName}' requires one of the configured security alternatives: {DescribeRequirements(securityRequirements)}."); + } + + private static bool Matches( + EndPointAuthorization availableAuthorization, + EndPointAuthorizationRequirement requiredAuthorization) + { + if (!string.Equals(availableAuthorization.Type, requiredAuthorization.Type, global::System.StringComparison.Ordinal)) + { + return false; + } + + return requiredAuthorization.Type switch + { + "OAuth2" => true, + "Http" => string.Equals( + availableAuthorization.Name, + requiredAuthorization.Name, + global::System.StringComparison.Ordinal), + "ApiKey" => string.Equals( + availableAuthorization.Location, + requiredAuthorization.Location, + global::System.StringComparison.Ordinal) && + string.Equals( + availableAuthorization.Name, + requiredAuthorization.Name, + global::System.StringComparison.Ordinal), + _ => string.Equals( + availableAuthorization.Location, + requiredAuthorization.Location, + global::System.StringComparison.Ordinal) && + string.Equals( + availableAuthorization.Name, + requiredAuthorization.Name, + global::System.StringComparison.Ordinal), + }; + } + + private static string DescribeRequirements( + global::System.Collections.Generic.IReadOnlyList securityRequirements) + { + var parts = new global::System.Collections.Generic.List(securityRequirements.Count); + + foreach (var requirement in securityRequirements) + { + if (requirement.Authorizations.Count == 0) + { + parts.Add("anonymous"); + continue; + } + + parts.Add(string.Join( + " + ", + global::System.Linq.Enumerable.Select(requirement.Authorizations, static x => x.FriendlyName))); + } + + return string.Join(" or ", parts); + } + } +} \ No newline at end of file diff --git a/src/libs/Serper/Generated/Serper.SerperClient.Authorizations.ApiKeyInHeader.g.cs b/src/libs/Serper/Generated/Serper.SerperClient.Authorizations.ApiKeyInHeader.g.cs index 88a7e3f..6434b93 100644 --- a/src/libs/Serper/Generated/Serper.SerperClient.Authorizations.ApiKeyInHeader.g.cs +++ b/src/libs/Serper/Generated/Serper.SerperClient.Authorizations.ApiKeyInHeader.g.cs @@ -5,13 +5,24 @@ namespace Serper { public sealed partial class SerperClient { + /// public void AuthorizeUsingApiKeyInHeader( string apiKey) { apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); - Authorizations.Clear(); + for (var i = Authorizations.Count - 1; i >= 0; i--) + { + var __authorization = Authorizations[i]; + if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header" && + __authorization.Name == "X-API-KEY") + { + Authorizations.RemoveAt(i); + } + } + Authorizations.Add(new global::Serper.EndPointAuthorization { Type = "ApiKey", diff --git a/src/libs/Serper/Generated/Serper.SerperClient.Autocomplete.g.cs b/src/libs/Serper/Generated/Serper.SerperClient.Autocomplete.g.cs index 1d4278c..b911ec6 100644 --- a/src/libs/Serper/Generated/Serper.SerperClient.Autocomplete.g.cs +++ b/src/libs/Serper/Generated/Serper.SerperClient.Autocomplete.g.cs @@ -5,6 +5,25 @@ namespace Serper { public partial class SerperClient { + + + private static readonly global::Serper.EndPointSecurityRequirement s_AutocompleteSecurityRequirement0 = + new global::Serper.EndPointSecurityRequirement + { + Authorizations = new global::Serper.EndPointAuthorizationRequirement[] + { new global::Serper.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::Serper.EndPointSecurityRequirement[] s_AutocompleteSecurityRequirements = + new global::Serper.EndPointSecurityRequirement[] + { s_AutocompleteSecurityRequirement0, + }; partial void PrepareAutocompleteArguments( global::System.Net.Http.HttpClient httpClient, global::Serper.AutocompleteRequest request); @@ -41,9 +60,15 @@ partial void ProcessAutocompleteResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::Serper.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_AutocompleteSecurityRequirements, + operationName: "AutocompleteAsync"); + var __pathBuilder = new global::Serper.PathBuilder( path: "/autocomplete", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, @@ -53,7 +78,7 @@ partial void ProcessAutocompleteResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/Serper/Generated/Serper.SerperClient.Constructors.ApiKeyInHeader.g.cs b/src/libs/Serper/Generated/Serper.SerperClient.Constructors.ApiKeyInHeader.g.cs index 28b3ed9..09825bd 100644 --- a/src/libs/Serper/Generated/Serper.SerperClient.Constructors.ApiKeyInHeader.g.cs +++ b/src/libs/Serper/Generated/Serper.SerperClient.Constructors.ApiKeyInHeader.g.cs @@ -6,6 +6,7 @@ namespace Serper public sealed partial class SerperClient { /// + public SerperClient( string apiKey, global::System.Net.Http.HttpClient? httpClient = null, diff --git a/src/libs/Serper/Generated/Serper.SerperClient.ImageSearch.g.cs b/src/libs/Serper/Generated/Serper.SerperClient.ImageSearch.g.cs index 266d7a5..80a0007 100644 --- a/src/libs/Serper/Generated/Serper.SerperClient.ImageSearch.g.cs +++ b/src/libs/Serper/Generated/Serper.SerperClient.ImageSearch.g.cs @@ -5,6 +5,25 @@ namespace Serper { public partial class SerperClient { + + + private static readonly global::Serper.EndPointSecurityRequirement s_ImageSearchSecurityRequirement0 = + new global::Serper.EndPointSecurityRequirement + { + Authorizations = new global::Serper.EndPointAuthorizationRequirement[] + { new global::Serper.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::Serper.EndPointSecurityRequirement[] s_ImageSearchSecurityRequirements = + new global::Serper.EndPointSecurityRequirement[] + { s_ImageSearchSecurityRequirement0, + }; partial void PrepareImageSearchArguments( global::System.Net.Http.HttpClient httpClient, global::Serper.ImageSearchRequest request); @@ -39,9 +58,15 @@ partial void ProcessImageSearchResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::Serper.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ImageSearchSecurityRequirements, + operationName: "ImageSearchAsync"); + var __pathBuilder = new global::Serper.PathBuilder( path: "/images", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, @@ -51,7 +76,7 @@ partial void ProcessImageSearchResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/Serper/Generated/Serper.SerperClient.NewsSearch.g.cs b/src/libs/Serper/Generated/Serper.SerperClient.NewsSearch.g.cs index 7d51010..96b3c99 100644 --- a/src/libs/Serper/Generated/Serper.SerperClient.NewsSearch.g.cs +++ b/src/libs/Serper/Generated/Serper.SerperClient.NewsSearch.g.cs @@ -5,6 +5,25 @@ namespace Serper { public partial class SerperClient { + + + private static readonly global::Serper.EndPointSecurityRequirement s_NewsSearchSecurityRequirement0 = + new global::Serper.EndPointSecurityRequirement + { + Authorizations = new global::Serper.EndPointAuthorizationRequirement[] + { new global::Serper.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::Serper.EndPointSecurityRequirement[] s_NewsSearchSecurityRequirements = + new global::Serper.EndPointSecurityRequirement[] + { s_NewsSearchSecurityRequirement0, + }; partial void PrepareNewsSearchArguments( global::System.Net.Http.HttpClient httpClient, global::Serper.NewsSearchRequest request); @@ -39,9 +58,15 @@ partial void ProcessNewsSearchResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::Serper.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_NewsSearchSecurityRequirements, + operationName: "NewsSearchAsync"); + var __pathBuilder = new global::Serper.PathBuilder( path: "/news", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, @@ -51,7 +76,7 @@ partial void ProcessNewsSearchResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/Serper/Generated/Serper.SerperClient.PatentSearch.g.cs b/src/libs/Serper/Generated/Serper.SerperClient.PatentSearch.g.cs index 40c138a..430d636 100644 --- a/src/libs/Serper/Generated/Serper.SerperClient.PatentSearch.g.cs +++ b/src/libs/Serper/Generated/Serper.SerperClient.PatentSearch.g.cs @@ -5,6 +5,25 @@ namespace Serper { public partial class SerperClient { + + + private static readonly global::Serper.EndPointSecurityRequirement s_PatentSearchSecurityRequirement0 = + new global::Serper.EndPointSecurityRequirement + { + Authorizations = new global::Serper.EndPointAuthorizationRequirement[] + { new global::Serper.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::Serper.EndPointSecurityRequirement[] s_PatentSearchSecurityRequirements = + new global::Serper.EndPointSecurityRequirement[] + { s_PatentSearchSecurityRequirement0, + }; partial void PreparePatentSearchArguments( global::System.Net.Http.HttpClient httpClient, global::Serper.PatentSearchRequest request); @@ -39,9 +58,15 @@ partial void ProcessPatentSearchResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::Serper.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_PatentSearchSecurityRequirements, + operationName: "PatentSearchAsync"); + var __pathBuilder = new global::Serper.PathBuilder( path: "/patents", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, @@ -51,7 +76,7 @@ partial void ProcessPatentSearchResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/Serper/Generated/Serper.SerperClient.PlacesSearch.g.cs b/src/libs/Serper/Generated/Serper.SerperClient.PlacesSearch.g.cs index 6a9b236..9ea643c 100644 --- a/src/libs/Serper/Generated/Serper.SerperClient.PlacesSearch.g.cs +++ b/src/libs/Serper/Generated/Serper.SerperClient.PlacesSearch.g.cs @@ -5,6 +5,25 @@ namespace Serper { public partial class SerperClient { + + + private static readonly global::Serper.EndPointSecurityRequirement s_PlacesSearchSecurityRequirement0 = + new global::Serper.EndPointSecurityRequirement + { + Authorizations = new global::Serper.EndPointAuthorizationRequirement[] + { new global::Serper.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::Serper.EndPointSecurityRequirement[] s_PlacesSearchSecurityRequirements = + new global::Serper.EndPointSecurityRequirement[] + { s_PlacesSearchSecurityRequirement0, + }; partial void PreparePlacesSearchArguments( global::System.Net.Http.HttpClient httpClient, global::Serper.PlacesSearchRequest request); @@ -39,9 +58,15 @@ partial void ProcessPlacesSearchResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::Serper.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_PlacesSearchSecurityRequirements, + operationName: "PlacesSearchAsync"); + var __pathBuilder = new global::Serper.PathBuilder( path: "/places", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, @@ -51,7 +76,7 @@ partial void ProcessPlacesSearchResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/Serper/Generated/Serper.SerperClient.ScholarSearch.g.cs b/src/libs/Serper/Generated/Serper.SerperClient.ScholarSearch.g.cs index abf26e7..9070f53 100644 --- a/src/libs/Serper/Generated/Serper.SerperClient.ScholarSearch.g.cs +++ b/src/libs/Serper/Generated/Serper.SerperClient.ScholarSearch.g.cs @@ -5,6 +5,25 @@ namespace Serper { public partial class SerperClient { + + + private static readonly global::Serper.EndPointSecurityRequirement s_ScholarSearchSecurityRequirement0 = + new global::Serper.EndPointSecurityRequirement + { + Authorizations = new global::Serper.EndPointAuthorizationRequirement[] + { new global::Serper.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::Serper.EndPointSecurityRequirement[] s_ScholarSearchSecurityRequirements = + new global::Serper.EndPointSecurityRequirement[] + { s_ScholarSearchSecurityRequirement0, + }; partial void PrepareScholarSearchArguments( global::System.Net.Http.HttpClient httpClient, global::Serper.ScholarSearchRequest request); @@ -40,9 +59,15 @@ partial void ProcessScholarSearchResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::Serper.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ScholarSearchSecurityRequirements, + operationName: "ScholarSearchAsync"); + var __pathBuilder = new global::Serper.PathBuilder( path: "/scholar", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, @@ -52,7 +77,7 @@ partial void ProcessScholarSearchResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/Serper/Generated/Serper.SerperClient.Search.g.cs b/src/libs/Serper/Generated/Serper.SerperClient.Search.g.cs index 013cce1..fc51e34 100644 --- a/src/libs/Serper/Generated/Serper.SerperClient.Search.g.cs +++ b/src/libs/Serper/Generated/Serper.SerperClient.Search.g.cs @@ -5,6 +5,25 @@ namespace Serper { public partial class SerperClient { + + + private static readonly global::Serper.EndPointSecurityRequirement s_SearchSecurityRequirement0 = + new global::Serper.EndPointSecurityRequirement + { + Authorizations = new global::Serper.EndPointAuthorizationRequirement[] + { new global::Serper.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::Serper.EndPointSecurityRequirement[] s_SearchSecurityRequirements = + new global::Serper.EndPointSecurityRequirement[] + { s_SearchSecurityRequirement0, + }; partial void PrepareSearchArguments( global::System.Net.Http.HttpClient httpClient, global::Serper.SearchRequest request); @@ -40,9 +59,15 @@ partial void ProcessSearchResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::Serper.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_SearchSecurityRequirements, + operationName: "SearchAsync"); + var __pathBuilder = new global::Serper.PathBuilder( path: "/search", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, @@ -52,7 +77,7 @@ partial void ProcessSearchResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/Serper/Generated/Serper.SerperClient.ShoppingSearch.g.cs b/src/libs/Serper/Generated/Serper.SerperClient.ShoppingSearch.g.cs index b264879..6613fb4 100644 --- a/src/libs/Serper/Generated/Serper.SerperClient.ShoppingSearch.g.cs +++ b/src/libs/Serper/Generated/Serper.SerperClient.ShoppingSearch.g.cs @@ -5,6 +5,25 @@ namespace Serper { public partial class SerperClient { + + + private static readonly global::Serper.EndPointSecurityRequirement s_ShoppingSearchSecurityRequirement0 = + new global::Serper.EndPointSecurityRequirement + { + Authorizations = new global::Serper.EndPointAuthorizationRequirement[] + { new global::Serper.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::Serper.EndPointSecurityRequirement[] s_ShoppingSearchSecurityRequirements = + new global::Serper.EndPointSecurityRequirement[] + { s_ShoppingSearchSecurityRequirement0, + }; partial void PrepareShoppingSearchArguments( global::System.Net.Http.HttpClient httpClient, global::Serper.ShoppingSearchRequest request); @@ -39,9 +58,15 @@ partial void ProcessShoppingSearchResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::Serper.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ShoppingSearchSecurityRequirements, + operationName: "ShoppingSearchAsync"); + var __pathBuilder = new global::Serper.PathBuilder( path: "/shopping", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, @@ -51,7 +76,7 @@ partial void ProcessShoppingSearchResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/Serper/Generated/Serper.SerperClient.VideoSearch.g.cs b/src/libs/Serper/Generated/Serper.SerperClient.VideoSearch.g.cs index 56961f8..9425e44 100644 --- a/src/libs/Serper/Generated/Serper.SerperClient.VideoSearch.g.cs +++ b/src/libs/Serper/Generated/Serper.SerperClient.VideoSearch.g.cs @@ -5,6 +5,25 @@ namespace Serper { public partial class SerperClient { + + + private static readonly global::Serper.EndPointSecurityRequirement s_VideoSearchSecurityRequirement0 = + new global::Serper.EndPointSecurityRequirement + { + Authorizations = new global::Serper.EndPointAuthorizationRequirement[] + { new global::Serper.EndPointAuthorizationRequirement + { + Type = "ApiKey", + Location = "Header", + Name = "X-API-KEY", + FriendlyName = "ApiKeyInHeader", + }, + }, + }; + private static readonly global::Serper.EndPointSecurityRequirement[] s_VideoSearchSecurityRequirements = + new global::Serper.EndPointSecurityRequirement[] + { s_VideoSearchSecurityRequirement0, + }; partial void PrepareVideoSearchArguments( global::System.Net.Http.HttpClient httpClient, global::Serper.VideoSearchRequest request); @@ -39,9 +58,15 @@ partial void ProcessVideoSearchResponseContent( httpClient: HttpClient, request: request); + + var __authorizations = global::Serper.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_VideoSearchSecurityRequirements, + operationName: "VideoSearchAsync"); + var __pathBuilder = new global::Serper.PathBuilder( path: "/videos", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, @@ -51,7 +76,7 @@ partial void ProcessVideoSearchResponseContent( __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; #endif - foreach (var __authorization in Authorizations) + foreach (var __authorization in __authorizations) { if (__authorization.Type == "Http" || __authorization.Type == "OAuth2") diff --git a/src/libs/Serper/Generated/Serper.SerperClient.g.cs b/src/libs/Serper/Generated/Serper.SerperClient.g.cs index 8a2ae07..c09fe2b 100644 --- a/src/libs/Serper/Generated/Serper.SerperClient.g.cs +++ b/src/libs/Serper/Generated/Serper.SerperClient.g.cs @@ -14,7 +14,7 @@ public sealed partial class SerperClient : global::Serper.ISerperClient, global: /// /// Production server /// - public const string DefaultBaseUrl = "https://google.serper.dev"; + public const string DefaultBaseUrl = "https://google.serper.dev/"; private bool _disposeHttpClient = true;