Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:Title: Update documentation for API endpoints and usage examples #10

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions src/libs/Instill/Generated/Instill.CatalogClient.ListChunks.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ partial void PrepareListChunksArguments(
global::System.Net.Http.HttpClient httpClient,
ref string namespaceId,
ref string catalogId,
ref string? fileUid);
ref string? fileUid,
global::System.Collections.Generic.IList<string>? chunkUids);
partial void PrepareListChunksRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string namespaceId,
string catalogId,
string? fileUid);
string? fileUid,
global::System.Collections.Generic.IList<string>? chunkUids);
partial void ProcessListChunksResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
Expand All @@ -31,12 +33,14 @@ partial void ProcessListChunksResponseContent(
/// <param name="namespaceId"></param>
/// <param name="catalogId"></param>
/// <param name="fileUid"></param>
/// <param name="chunkUids"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::Instill.ListChunksResponse> ListChunksAsync(
string namespaceId,
string catalogId,
string? fileUid = default,
global::System.Collections.Generic.IList<string>? chunkUids = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
Expand All @@ -45,13 +49,15 @@ partial void ProcessListChunksResponseContent(
httpClient: _httpClient,
namespaceId: ref namespaceId,
catalogId: ref catalogId,
fileUid: ref fileUid);
fileUid: ref fileUid,
chunkUids: chunkUids);

var __pathBuilder = new PathBuilder(
path: $"/v1alpha/namespaces/{namespaceId}/catalogs/{catalogId}/chunks",
baseUri: _httpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("fileUid", fileUid)
.AddOptionalParameter("chunkUids", chunkUids, delimiter: ",", explode: true)
;
var __path = __pathBuilder.ToString();
using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
Expand All @@ -66,7 +72,8 @@ partial void ProcessListChunksResponseContent(
httpRequestMessage: httpRequest,
namespaceId: namespaceId,
catalogId: catalogId,
fileUid: fileUid);
fileUid: fileUid,
chunkUids: chunkUids);

using var response = await _httpClient.SendAsync(
request: httpRequest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ public partial interface ICatalogClient
/// <param name="namespaceId"></param>
/// <param name="catalogId"></param>
/// <param name="fileUid"></param>
/// <param name="chunkUids"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::Instill.ListChunksResponse> ListChunksAsync(
string namespaceId,
string catalogId,
string? fileUid = default,
global::System.Collections.Generic.IList<string>? chunkUids = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
8 changes: 8 additions & 0 deletions src/libs/Instill/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1436,6 +1436,14 @@ paths:
description: unique identifier of the file
schema:
type: string
- name: chunkUids
in: query
description: repeated chunk uid
style: form
schema:
type: array
items:
type: string
responses:
'200':
description: A successful response.
Expand Down