From 58a26f7e7d8e16d2ac2fe864d826f2c6ec0445a1 Mon Sep 17 00:00:00 2001 From: HavenDV Date: Wed, 23 Oct 2024 17:12:54 +0400 Subject: [PATCH] fix: Fixed missing owner path parameters. --- src/helpers/FixOpenApiSpec/Program.cs | 20 +++++++++++++++ .../LangSmith.ITagsClient.CreateTag.g.cs | 4 +++ .../LangSmith.ITagsClient.DeleteTag.g.cs | 2 ++ .../LangSmith.ITagsClient.GetTag.g.cs | 2 ++ .../LangSmith.ITagsClient.GetTags.g.cs | 2 ++ .../LangSmith.ITagsClient.UpdateTag.g.cs | 4 +++ .../LangSmith.TagsClient.CreateTag.g.cs | 9 +++++++ .../LangSmith.TagsClient.DeleteTag.g.cs | 14 ++++++++--- .../LangSmith.TagsClient.GetTag.g.cs | 14 ++++++++--- .../LangSmith.TagsClient.GetTags.g.cs | 14 ++++++++--- .../LangSmith.TagsClient.UpdateTag.g.cs | 9 +++++++ src/libs/LangSmith/openapi.yaml | 25 +++++++++++++++++++ 12 files changed, 107 insertions(+), 12 deletions(-) diff --git a/src/helpers/FixOpenApiSpec/Program.cs b/src/helpers/FixOpenApiSpec/Program.cs index 5f443c0f..7635bf99 100644 --- a/src/helpers/FixOpenApiSpec/Program.cs +++ b/src/helpers/FixOpenApiSpec/Program.cs @@ -19,6 +19,26 @@ var openApiDocument = new OpenApiStringReader().Read(yamlOrJson, out var diagnostics); +var ownerParameter = new OpenApiParameter +{ + Name = "owner", + In = ParameterLocation.Path, + Required = true, + Schema = new OpenApiSchema + { + Type = "string" + }, +}; + +foreach (var (_, operation) in openApiDocument.Paths["/api/v1/repos/{owner}/{repo}/tags"].Operations) +{ + operation.Parameters.Add(ownerParameter); +} +foreach (var (_, operation) in openApiDocument.Paths["/api/v1/repos/{owner}/{repo}/tags/{tag_name}"].Operations) +{ + operation.Parameters.Add(ownerParameter); +} + openApiDocument.Servers.Add(new OpenApiServer { Url = "https://api.smith.langchain.com" }); openApiDocument.SecurityRequirements = new List diff --git a/src/libs/LangSmith/Generated/LangSmith.ITagsClient.CreateTag.g.cs b/src/libs/LangSmith/Generated/LangSmith.ITagsClient.CreateTag.g.cs index 763897b5..f11bb96e 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ITagsClient.CreateTag.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ITagsClient.CreateTag.g.cs @@ -8,11 +8,13 @@ public partial interface ITagsClient /// Create Tag /// /// + /// /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateTagAsync( string repo, + string owner, global::LangSmith.RepoTagRequest request, global::System.Threading.CancellationToken cancellationToken = default); @@ -20,12 +22,14 @@ public partial interface ITagsClient /// Create Tag /// /// + /// /// /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task CreateTagAsync( string repo, + string owner, string tagName, global::System.Guid commitId, global::System.Threading.CancellationToken cancellationToken = default); diff --git a/src/libs/LangSmith/Generated/LangSmith.ITagsClient.DeleteTag.g.cs b/src/libs/LangSmith/Generated/LangSmith.ITagsClient.DeleteTag.g.cs index eaa98e89..6716205b 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ITagsClient.DeleteTag.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ITagsClient.DeleteTag.g.cs @@ -9,11 +9,13 @@ public partial interface ITagsClient /// /// /// + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task DeleteTagAsync( string repo, string tagName, + string owner, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/LangSmith/Generated/LangSmith.ITagsClient.GetTag.g.cs b/src/libs/LangSmith/Generated/LangSmith.ITagsClient.GetTag.g.cs index be192cde..3d98c1ba 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ITagsClient.GetTag.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ITagsClient.GetTag.g.cs @@ -9,11 +9,13 @@ public partial interface ITagsClient /// /// /// + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task GetTagAsync( string repo, string tagName, + string owner, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/LangSmith/Generated/LangSmith.ITagsClient.GetTags.g.cs b/src/libs/LangSmith/Generated/LangSmith.ITagsClient.GetTags.g.cs index 47c0a33e..12575991 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ITagsClient.GetTags.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ITagsClient.GetTags.g.cs @@ -8,10 +8,12 @@ public partial interface ITagsClient /// Get Tags /// /// + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task> GetTagsAsync( string repo, + string owner, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/LangSmith/Generated/LangSmith.ITagsClient.UpdateTag.g.cs b/src/libs/LangSmith/Generated/LangSmith.ITagsClient.UpdateTag.g.cs index b7cefe59..72b2fd30 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ITagsClient.UpdateTag.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ITagsClient.UpdateTag.g.cs @@ -9,12 +9,14 @@ public partial interface ITagsClient /// /// /// + /// /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task UpdateTagAsync( string repo, string tagName, + string owner, global::LangSmith.RepoUpdateTagRequest request, global::System.Threading.CancellationToken cancellationToken = default); @@ -23,12 +25,14 @@ public partial interface ITagsClient /// /// /// + /// /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task UpdateTagAsync( string repo, string tagName, + string owner, global::System.Guid commitId, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/LangSmith/Generated/LangSmith.TagsClient.CreateTag.g.cs b/src/libs/LangSmith/Generated/LangSmith.TagsClient.CreateTag.g.cs index b9c9abaf..2f3d77ae 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TagsClient.CreateTag.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TagsClient.CreateTag.g.cs @@ -8,11 +8,13 @@ public partial class TagsClient partial void PrepareCreateTagArguments( global::System.Net.Http.HttpClient httpClient, ref string repo, + ref string owner, global::LangSmith.RepoTagRequest request); partial void PrepareCreateTagRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, string repo, + string owner, global::LangSmith.RepoTagRequest request); partial void ProcessCreateTagResponse( global::System.Net.Http.HttpClient httpClient, @@ -27,11 +29,13 @@ partial void ProcessCreateTagResponseContent( /// Create Tag /// /// + /// /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateTagAsync( string repo, + string owner, global::LangSmith.RepoTagRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -42,6 +46,7 @@ partial void ProcessCreateTagResponseContent( PrepareCreateTagArguments( httpClient: HttpClient, repo: ref repo, + owner: ref owner, request: request); var __pathBuilder = new PathBuilder( @@ -81,6 +86,7 @@ partial void ProcessCreateTagResponseContent( httpClient: HttpClient, httpRequestMessage: __httpRequest, repo: repo, + owner: owner, request: request); using var __response = await HttpClient.SendAsync( @@ -124,12 +130,14 @@ partial void ProcessCreateTagResponseContent( /// Create Tag /// /// + /// /// /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task CreateTagAsync( string repo, + string owner, string tagName, global::System.Guid commitId, global::System.Threading.CancellationToken cancellationToken = default) @@ -142,6 +150,7 @@ partial void ProcessCreateTagResponseContent( return await CreateTagAsync( repo: repo, + owner: owner, request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } diff --git a/src/libs/LangSmith/Generated/LangSmith.TagsClient.DeleteTag.g.cs b/src/libs/LangSmith/Generated/LangSmith.TagsClient.DeleteTag.g.cs index a31dff31..daf16a3e 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TagsClient.DeleteTag.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TagsClient.DeleteTag.g.cs @@ -8,12 +8,14 @@ public partial class TagsClient partial void PrepareDeleteTagArguments( global::System.Net.Http.HttpClient httpClient, ref string repo, - ref string tagName); + ref string tagName, + ref string owner); partial void PrepareDeleteTagRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, string repo, - string tagName); + string tagName, + string owner); partial void ProcessDeleteTagResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); @@ -28,11 +30,13 @@ partial void ProcessDeleteTagResponseContent( /// /// /// + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task DeleteTagAsync( string repo, string tagName, + string owner, global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( @@ -40,7 +44,8 @@ partial void ProcessDeleteTagResponseContent( PrepareDeleteTagArguments( httpClient: HttpClient, repo: ref repo, - tagName: ref tagName); + tagName: ref tagName, + owner: ref owner); var __pathBuilder = new PathBuilder( path: $"/api/v1/repos/{owner}/{repo}/tags/{tagName}", @@ -73,7 +78,8 @@ partial void ProcessDeleteTagResponseContent( httpClient: HttpClient, httpRequestMessage: __httpRequest, repo: repo, - tagName: tagName); + tagName: tagName, + owner: owner); using var __response = await HttpClient.SendAsync( request: __httpRequest, diff --git a/src/libs/LangSmith/Generated/LangSmith.TagsClient.GetTag.g.cs b/src/libs/LangSmith/Generated/LangSmith.TagsClient.GetTag.g.cs index cc47266d..03430c47 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TagsClient.GetTag.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TagsClient.GetTag.g.cs @@ -8,12 +8,14 @@ public partial class TagsClient partial void PrepareGetTagArguments( global::System.Net.Http.HttpClient httpClient, ref string repo, - ref string tagName); + ref string tagName, + ref string owner); partial void PrepareGetTagRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, string repo, - string tagName); + string tagName, + string owner); partial void ProcessGetTagResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); @@ -28,11 +30,13 @@ partial void ProcessGetTagResponseContent( /// /// /// + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task GetTagAsync( string repo, string tagName, + string owner, global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( @@ -40,7 +44,8 @@ partial void ProcessGetTagResponseContent( PrepareGetTagArguments( httpClient: HttpClient, repo: ref repo, - tagName: ref tagName); + tagName: ref tagName, + owner: ref owner); var __pathBuilder = new PathBuilder( path: $"/api/v1/repos/{owner}/{repo}/tags/{tagName}", @@ -73,7 +78,8 @@ partial void ProcessGetTagResponseContent( httpClient: HttpClient, httpRequestMessage: __httpRequest, repo: repo, - tagName: tagName); + tagName: tagName, + owner: owner); using var __response = await HttpClient.SendAsync( request: __httpRequest, diff --git a/src/libs/LangSmith/Generated/LangSmith.TagsClient.GetTags.g.cs b/src/libs/LangSmith/Generated/LangSmith.TagsClient.GetTags.g.cs index 951d3779..8f18b807 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TagsClient.GetTags.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TagsClient.GetTags.g.cs @@ -7,11 +7,13 @@ public partial class TagsClient { partial void PrepareGetTagsArguments( global::System.Net.Http.HttpClient httpClient, - ref string repo); + ref string repo, + ref string owner); partial void PrepareGetTagsRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string repo); + string repo, + string owner); partial void ProcessGetTagsResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); @@ -25,17 +27,20 @@ partial void ProcessGetTagsResponseContent( /// Get Tags /// /// + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task> GetTagsAsync( string repo, + string owner, global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); PrepareGetTagsArguments( httpClient: HttpClient, - repo: ref repo); + repo: ref repo, + owner: ref owner); var __pathBuilder = new PathBuilder( path: $"/api/v1/repos/{owner}/{repo}/tags", @@ -67,7 +72,8 @@ partial void ProcessGetTagsResponseContent( PrepareGetTagsRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - repo: repo); + repo: repo, + owner: owner); using var __response = await HttpClient.SendAsync( request: __httpRequest, diff --git a/src/libs/LangSmith/Generated/LangSmith.TagsClient.UpdateTag.g.cs b/src/libs/LangSmith/Generated/LangSmith.TagsClient.UpdateTag.g.cs index 3f2b42e8..618e1c76 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TagsClient.UpdateTag.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TagsClient.UpdateTag.g.cs @@ -9,12 +9,14 @@ partial void PrepareUpdateTagArguments( global::System.Net.Http.HttpClient httpClient, ref string repo, ref string tagName, + ref string owner, global::LangSmith.RepoUpdateTagRequest request); partial void PrepareUpdateTagRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, string repo, string tagName, + string owner, global::LangSmith.RepoUpdateTagRequest request); partial void ProcessUpdateTagResponse( global::System.Net.Http.HttpClient httpClient, @@ -30,12 +32,14 @@ partial void ProcessUpdateTagResponseContent( /// /// /// + /// /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task UpdateTagAsync( string repo, string tagName, + string owner, global::LangSmith.RepoUpdateTagRequest request, global::System.Threading.CancellationToken cancellationToken = default) { @@ -47,6 +51,7 @@ partial void ProcessUpdateTagResponseContent( httpClient: HttpClient, repo: ref repo, tagName: ref tagName, + owner: ref owner, request: request); var __pathBuilder = new PathBuilder( @@ -87,6 +92,7 @@ partial void ProcessUpdateTagResponseContent( httpRequestMessage: __httpRequest, repo: repo, tagName: tagName, + owner: owner, request: request); using var __response = await HttpClient.SendAsync( @@ -131,12 +137,14 @@ partial void ProcessUpdateTagResponseContent( /// /// /// + /// /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task UpdateTagAsync( string repo, string tagName, + string owner, global::System.Guid commitId, global::System.Threading.CancellationToken cancellationToken = default) { @@ -148,6 +156,7 @@ partial void ProcessUpdateTagResponseContent( return await UpdateTagAsync( repo: repo, tagName: tagName, + owner: owner, request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } diff --git a/src/libs/LangSmith/openapi.yaml b/src/libs/LangSmith/openapi.yaml index a89aff63..f34d8586 100644 --- a/src/libs/LangSmith/openapi.yaml +++ b/src/libs/LangSmith/openapi.yaml @@ -10048,6 +10048,11 @@ paths: schema: title: Repo type: string + - name: owner + in: path + required: true + schema: + type: string responses: '200': description: Successful Response @@ -10080,6 +10085,11 @@ paths: schema: title: Repo type: string + - name: owner + in: path + required: true + schema: + type: string requestBody: content: application/json: @@ -10122,6 +10132,11 @@ paths: schema: title: Tag Name type: string + - name: owner + in: path + required: true + schema: + type: string responses: '200': description: Successful Response @@ -10157,6 +10172,11 @@ paths: schema: title: Tag Name type: string + - name: owner + in: path + required: true + schema: + type: string requestBody: content: application/json: @@ -10198,6 +10218,11 @@ paths: schema: title: Tag Name type: string + - name: owner + in: path + required: true + schema: + type: string responses: '200': description: Successful Response