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 21, 2024
1 parent 543b00b commit d51d64a
Show file tree
Hide file tree
Showing 10 changed files with 969 additions and 775 deletions.
1,336 changes: 674 additions & 662 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,106 @@

#nullable enable

namespace LangSmith
{
public partial class ChartsClient
{
partial void PrepareReadSectionsApiV1ChartsSectionGetArguments(
global::System.Net.Http.HttpClient httpClient,
ref int limit,
ref int offset,
ref global::System.AnyOf<string?, object>? titleContains);
partial void PrepareReadSectionsApiV1ChartsSectionGetRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
int limit,
int offset,
global::System.AnyOf<string?, object>? titleContains);
partial void ProcessReadSectionsApiV1ChartsSectionGetResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);

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

/// <summary>
/// Read Sections<br/>
/// Get all sections for the tenant.
/// </summary>
/// <param name="limit">
/// Default Value: 100
/// </param>
/// <param name="offset">
/// Default Value: 0
/// </param>
/// <param name="titleContains"></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::System.Collections.Generic.IList<global::LangSmith.CustomChartsSectionResponse>> ReadSectionsApiV1ChartsSectionGetAsync(
int limit,
int offset,
global::System.AnyOf<string?, object>? titleContains,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: _httpClient);
PrepareReadSectionsApiV1ChartsSectionGetArguments(
httpClient: _httpClient,
limit: ref limit,
offset: ref offset,
titleContains: ref titleContains);

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('/') + $"/api/v1/charts/section?limit={limit}&offset={offset}&title_contains={titleContains}", global::System.UriKind.RelativeOrAbsolute));

PrepareRequest(
client: _httpClient,
request: httpRequest);
PrepareReadSectionsApiV1ChartsSectionGetRequest(
httpClient: _httpClient,
httpRequestMessage: httpRequest,
limit: limit,
offset: offset,
titleContains: titleContains);

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

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

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

ProcessResponseContent(
client: _httpClient,
response: response,
content: ref __content);
ProcessReadSectionsApiV1ChartsSectionGetResponseContent(
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.IListCustomChartsSectionResponse) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,39 +99,44 @@ partial void ProcessCreateExampleApiV1ExamplesPostResponseContent(
/// Create Example<br/>
/// Create a new example.
/// </summary>
/// <param name="inputs"></param>
/// <param name="outputs"></param>
/// <param name="datasetId"></param>
/// <param name="sourceRunId"></param>
/// <param name="metadata"></param>
/// <param name="createdAt"></param>
/// <param name="id"></param>
/// <param name="inputs"></param>
/// <param name="split">
/// Default Value: base
/// </param>
/// <param name="id"></param>
/// <param name="useSourceRunIo">
/// Default Value: false
/// </param>
/// <param name="createdAt"></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.Example> CreateExampleApiV1ExamplesPostAsync(
global::LangSmith.ExampleCreateInputs inputs,
string datasetId,
global::System.AnyOf<global::LangSmith.ExampleCreateOutputs, object>? outputs = default,
global::System.AnyOf<string, object>? sourceRunId = default,
global::System.AnyOf<global::LangSmith.ExampleCreateMetadata, object>? metadata = default,
global::System.DateTime createdAt = default,
global::System.AnyOf<string, object>? id = default,
global::System.AnyOf<global::LangSmith.ExampleCreateInputs, object>? inputs = default,
global::System.AnyOf<global::System.Collections.Generic.IList<string>, string?, object>? split = default,
global::System.AnyOf<string, object>? id = default,
bool useSourceRunIo = false,
global::System.DateTime createdAt = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var request = new global::LangSmith.ExampleCreate
{
Inputs = inputs,
Outputs = outputs,
DatasetId = datasetId,
SourceRunId = sourceRunId,
Metadata = metadata,
CreatedAt = createdAt,
Id = id,
Inputs = inputs,
Split = split,
Id = id,
UseSourceRunIo = useSourceRunIo,
CreatedAt = createdAt,
};

return await CreateExampleApiV1ExamplesPostAsync(
Expand Down
14 changes: 7 additions & 7 deletions src/libs/LangSmith/Generated/LangSmith.Models.Example.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ namespace LangSmith
/// </summary>
public sealed partial class Example
{
/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("inputs")]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::LangSmith.ExampleInputs Inputs { get; set; }

/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -45,6 +38,13 @@ public sealed partial class Example
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory2))]
public global::System.AnyOf<global::LangSmith.ExampleMetadata, object>? Metadata { get; set; }

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

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

/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -48,9 +41,9 @@ public sealed partial class ExampleBulkCreate
/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("created_at")]
[global::System.Text.Json.Serialization.JsonPropertyName("inputs")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory2))]
public global::System.AnyOf<global::System.DateTime?, object>? CreatedAt { get; set; }
public global::System.AnyOf<global::LangSmith.ExampleBulkCreateInputs, object>? Inputs { get; set; }

/// <summary>
/// Default Value: base
Expand All @@ -66,6 +59,19 @@ public sealed partial class ExampleBulkCreate
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory2))]
public global::System.AnyOf<string, object>? Id { get; set; }

/// <summary>
/// Default Value: false
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("use_source_run_io")]
public bool UseSourceRunIo { get; set; } = false;

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

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand Down
32 changes: 19 additions & 13 deletions src/libs/LangSmith/Generated/LangSmith.Models.ExampleCreate.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ namespace LangSmith
/// </summary>
public sealed partial class ExampleCreate
{
/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("inputs")]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::LangSmith.ExampleCreateInputs Inputs { get; set; }

/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -48,8 +41,16 @@ public sealed partial class ExampleCreate
/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("created_at")]
public global::System.DateTime CreatedAt { get; set; }
[global::System.Text.Json.Serialization.JsonPropertyName("inputs")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory2))]
public global::System.AnyOf<global::LangSmith.ExampleCreateInputs, object>? Inputs { get; set; }

/// <summary>
/// Default Value: base
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("split")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory3))]
public global::System.AnyOf<global::System.Collections.Generic.IList<string>, string?, object>? Split { get; set; } = "base";

/// <summary>
///
Expand All @@ -59,11 +60,16 @@ public sealed partial class ExampleCreate
public global::System.AnyOf<string, object>? Id { get; set; }

/// <summary>
/// Default Value: base
/// Default Value: false
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("split")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory3))]
public global::System.AnyOf<global::System.Collections.Generic.IList<string>, string?, object>? Split { get; set; } = "base";
[global::System.Text.Json.Serialization.JsonPropertyName("use_source_run_io")]
public bool UseSourceRunIo { get; set; } = false;

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

/// <summary>
/// Additional properties that are not explicitly defined in the schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ namespace LangSmith
/// </summary>
public sealed partial class ExampleWithRuns
{
/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("inputs")]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::LangSmith.ExampleWithRunsInputs Inputs { get; set; }

/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -45,6 +38,13 @@ public sealed partial class ExampleWithRuns
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory2))]
public global::System.AnyOf<global::LangSmith.ExampleWithRunsMetadata, object>? Metadata { get; set; }

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

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

/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -45,6 +38,13 @@ public sealed partial class ExampleWithRunsCH
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory2))]
public global::System.AnyOf<global::LangSmith.ExampleWithRunsCHMetadata, object>? Metadata { get; set; }

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

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

/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -45,6 +38,13 @@ public sealed partial class PublicExampleWithRuns
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory2))]
public global::System.AnyOf<global::LangSmith.PublicExampleWithRunsMetadata, object>? Metadata { get; set; }

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

/// <summary>
///
/// </summary>
Expand Down
Loading

0 comments on commit d51d64a

Please sign in to comment.