Skip to content

Commit

Permalink
feat: Updated OpenAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 22, 2024
1 parent 733f18b commit 96f0507
Show file tree
Hide file tree
Showing 10 changed files with 1,135 additions and 782 deletions.
1,520 changes: 768 additions & 752 deletions src/libs/LangSmith/Generated/JsonSerializerContextTypes.g.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@

#nullable enable

namespace LangSmith
{
public partial class ChartsClient
{
partial void PrepareReadChartPreviewApiV1ChartsPreviewPostArguments(
global::System.Net.Http.HttpClient httpClient,
global::LangSmith.CustomChartPreviewRequest request);
partial void PrepareReadChartPreviewApiV1ChartsPreviewPostRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
global::LangSmith.CustomChartPreviewRequest request);
partial void ProcessReadChartPreviewApiV1ChartsPreviewPostResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);

partial void ProcessReadChartPreviewApiV1ChartsPreviewPostResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);

/// <summary>
/// Read Chart Preview<br/>
/// Get a preview for a chart without actually creating it.
/// </summary>
/// <param name="request"></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::LangSmith.SingleCustomChartResponseBase> ReadChartPreviewApiV1ChartsPreviewPostAsync(
global::LangSmith.CustomChartPreviewRequest request,
global::System.Threading.CancellationToken cancellationToken = default)
{
request = request ?? throw new global::System.ArgumentNullException(nameof(request));

PrepareArguments(
client: _httpClient);
PrepareReadChartPreviewApiV1ChartsPreviewPostArguments(
httpClient: _httpClient,
request: request);

using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/api/v1/charts/preview", global::System.UriKind.RelativeOrAbsolute));
var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, global::LangSmith.SourceGenerationContext.Default.CustomChartPreviewRequest);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
mediaType: "application/json");
httpRequest.Content = __httpRequestContent;

PrepareRequest(
client: _httpClient,
request: httpRequest);
PrepareReadChartPreviewApiV1ChartsPreviewPostRequest(
httpClient: _httpClient,
httpRequestMessage: httpRequest,
request: request);

using var response = await _httpClient.SendAsync(
request: httpRequest,
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
cancellationToken: cancellationToken).ConfigureAwait(false);

ProcessResponse(
client: _httpClient,
response: response);
ProcessReadChartPreviewApiV1ChartsPreviewPostResponse(
httpClient: _httpClient,
httpResponseMessage: response);

var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

ProcessResponseContent(
client: _httpClient,
response: response,
content: ref __content);
ProcessReadChartPreviewApiV1ChartsPreviewPostResponseContent(
httpClient: _httpClient,
httpResponseMessage: response,
content: ref __content);

try
{
response.EnsureSuccessStatusCode();
}
catch (global::System.Net.Http.HttpRequestException ex)
{
throw new global::System.InvalidOperationException(__content, ex);
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, global::LangSmith.SourceGenerationContext.Default.NullableSingleCustomChartResponseBase) ??

Check failure on line 94 in src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadChartPreviewApiV1ChartsPreviewPost.g.cs

View workflow job for this annotation

GitHub Actions / Test / Build, test and publish

'SourceGenerationContext' does not contain a definition for 'NullableSingleCustomChartResponseBase' and no accessible extension method 'NullableSingleCustomChartResponseBase' accepting a first argument of type 'SourceGenerationContext' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 94 in src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadChartPreviewApiV1ChartsPreviewPost.g.cs

View workflow job for this annotation

GitHub Actions / Test / Build, test and publish

'SourceGenerationContext' does not contain a definition for 'NullableSingleCustomChartResponseBase' and no accessible extension method 'NullableSingleCustomChartResponseBase' accepting a first argument of type 'SourceGenerationContext' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 94 in src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadChartPreviewApiV1ChartsPreviewPost.g.cs

View workflow job for this annotation

GitHub Actions / Test / Build, test and publish

'SourceGenerationContext' does not contain a definition for 'NullableSingleCustomChartResponseBase' and no accessible extension method 'NullableSingleCustomChartResponseBase' accepting a first argument of type 'SourceGenerationContext' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 94 in src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadChartPreviewApiV1ChartsPreviewPost.g.cs

View workflow job for this annotation

GitHub Actions / Test / Build, test and publish

'SourceGenerationContext' does not contain a definition for 'NullableSingleCustomChartResponseBase' and no accessible extension method 'NullableSingleCustomChartResponseBase' accepting a first argument of type 'SourceGenerationContext' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 94 in src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadChartPreviewApiV1ChartsPreviewPost.g.cs

View workflow job for this annotation

GitHub Actions / Test / Build, test and publish

'SourceGenerationContext' does not contain a definition for 'NullableSingleCustomChartResponseBase' and no accessible extension method 'NullableSingleCustomChartResponseBase' accepting a first argument of type 'SourceGenerationContext' could be found (are you missing a using directive or an assembly reference?)
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}

/// <summary>
/// Read Chart Preview<br/>
/// Get a preview for a chart without actually creating it.
/// </summary>
/// <param name="bucketInfo"></param>
/// <param name="chart"></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::LangSmith.SingleCustomChartResponseBase> ReadChartPreviewApiV1ChartsPreviewPostAsync(
global::LangSmith.CustomChartsRequestBase bucketInfo,
global::LangSmith.CustomChartCreatePreview chart,
global::System.Threading.CancellationToken cancellationToken = default)
{
var request = new global::LangSmith.CustomChartPreviewRequest
{
BucketInfo = bucketInfo,
Chart = chart,
};

return await ReadChartPreviewApiV1ChartsPreviewPostAsync(
request: request,
cancellationToken: cancellationToken).ConfigureAwait(false);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ namespace LangSmith
{
public partial class LangSmithApi
{
partial void PrepareOkOkGetArguments(
partial void PrepareOkApiV1OkGetArguments(
global::System.Net.Http.HttpClient httpClient);
partial void PrepareOkOkGetRequest(
partial void PrepareOkApiV1OkGetRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage);
partial void ProcessOkOkGetResponse(
partial void ProcessOkApiV1OkGetResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);

partial void ProcessOkOkGetResponseContent(
partial void ProcessOkApiV1OkGetResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);
Expand All @@ -24,22 +24,22 @@ partial void ProcessOkOkGetResponseContent(
/// </summary>
/// <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::LangSmith.OkOkGetResponse> OkOkGetAsync(
public async global::System.Threading.Tasks.Task<global::LangSmith.OkApiV1OkGetResponse> OkApiV1OkGetAsync(
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: _httpClient);
PrepareOkOkGetArguments(
PrepareOkApiV1OkGetArguments(
httpClient: _httpClient);

using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Get,
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/ok", global::System.UriKind.RelativeOrAbsolute));
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/api/v1/ok", global::System.UriKind.RelativeOrAbsolute));

PrepareRequest(
client: _httpClient,
request: httpRequest);
PrepareOkOkGetRequest(
PrepareOkApiV1OkGetRequest(
httpClient: _httpClient,
httpRequestMessage: httpRequest);

Expand All @@ -51,7 +51,7 @@ partial void ProcessOkOkGetResponseContent(
ProcessResponse(
client: _httpClient,
response: response);
ProcessOkOkGetResponse(
ProcessOkApiV1OkGetResponse(
httpClient: _httpClient,
httpResponseMessage: response);

Expand All @@ -61,7 +61,7 @@ partial void ProcessOkOkGetResponseContent(
client: _httpClient,
response: response,
content: ref __content);
ProcessOkOkGetResponseContent(
ProcessOkApiV1OkGetResponseContent(
httpClient: _httpClient,
httpResponseMessage: response,
content: ref __content);
Expand All @@ -76,7 +76,7 @@ partial void ProcessOkOkGetResponseContent(
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, global::LangSmith.SourceGenerationContext.Default.OkOkGetResponse) ??
global::System.Text.Json.JsonSerializer.Deserialize(__content, global::LangSmith.SourceGenerationContext.Default.OkApiV1OkGetResponse) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

#nullable enable

namespace LangSmith
{
/// <summary>
///
/// </summary>
public sealed partial class CustomChartCreatePreview
{
/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("series")]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.Collections.Generic.IList<global::LangSmith.CustomChartSeries> Series { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

#nullable enable

namespace LangSmith
{
/// <summary>
///
/// </summary>
public sealed partial class CustomChartPreviewRequest
{
/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("bucket_info")]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::LangSmith.CustomChartsRequestBase BucketInfo { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("chart")]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::LangSmith.CustomChartCreatePreview Chart { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace LangSmith
{
/// <summary>
///
/// </summary>
public sealed partial class CustomChartsRequestBase
{
/// <summary>
/// Default Value: UTC
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("timezone")]
public string? Timezone { get; set; } = "UTC";

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("start_time")]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.DateTime StartTime { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("end_time")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory2))]
public global::System.AnyOf<global::System.DateTime?, object>? EndTime { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("stride")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AllOfJsonConverterFactory1))]
public global::System.AllOf<global::LangSmith.TimedeltaInput>? Stride { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace LangSmith
/// <summary>
///
/// </summary>
public sealed partial class OkOkGetResponse
public sealed partial class OkApiV1OkGetResponse
{

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ namespace LangSmith
/// </summary>
public sealed partial class SingleCustomChartResponse
{
/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("data")]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.Collections.Generic.IList<global::LangSmith.CustomChartsDataPoint> Data { get; set; }

/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -60,13 +67,6 @@ public sealed partial class SingleCustomChartResponse
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.Collections.Generic.IList<global::LangSmith.CustomChartSeries> Series { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("data")]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.Collections.Generic.IList<global::LangSmith.CustomChartsDataPoint> Data { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

#nullable enable

namespace LangSmith
{
/// <summary>
///
/// </summary>
public sealed partial class SingleCustomChartResponseBase
{
/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("data")]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.Collections.Generic.IList<global::LangSmith.CustomChartsDataPoint> Data { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();
}
}
Loading

0 comments on commit 96f0507

Please sign in to comment.