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:Update README with installation instructions and usage examples #27

Closed
wants to merge 1 commit into from

Conversation

HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Aug 22, 2024

Summary by CodeRabbit

  • New Features

    • Introduced a new API endpoint for chart previews, allowing users to obtain chart data without creating it.
    • Added a health check endpoint for system status verification.
    • Enhanced API request structures with new models for improved input handling.
  • Bug Fixes

    • Resolved issues related to the previous API endpoint naming for better clarity and usability.
  • Documentation

    • Updated OpenAPI specification to reflect new endpoints and altered schemas.

Copy link

coderabbitai bot commented Aug 22, 2024

Walkthrough

The recent updates introduce new classes and methods for handling chart previews and requests within the LangSmith namespace. Key modifications include the addition of endpoints in the OpenAPI specification, enhancements to model classes for chart data, and a shift toward versioned API structures. These changes encompass refined request and response handling, ensuring robust interaction with the charting API.

Changes

Files Change Summary
src/libs/LangSmith/Generated/LangSmith.ChartsClient.* Introduced ChartsClient class with methods for chart preview requests and response handling.
src/libs/LangSmith/Generated/LangSmith.LangSmithApi.* Renamed methods for versioning; updated request URI for consistency in API structure.
src/libs/LangSmith/Generated/LangSmith.Models.CustomChartCreatePreview.g.cs Defined CustomChartCreatePreview model with required properties for chart creation.
src/libs/LangSmith/Generated/LangSmith.Models.CustomChartPreviewRequest.g.cs Created CustomChartPreviewRequest model with required properties for API requests.
src/libs/LangSmith/Generated/LangSmith.Models.CustomChartsRequestBase.g.cs Defined CustomChartsRequestBase for managing chart request parameters.
src/libs/LangSmith/Generated/LangSmith.Models.OkApiV1OkGetResponse.g.cs Renamed response class for versioning; no functional changes.
src/libs/LangSmith/Generated/LangSmith.Models.SingleCustomChartResponse.g.cs Added Data property to SingleCustomChartResponse class for chart data representation.
src/libs/LangSmith/Generated/LangSmith.Models.SingleCustomChartResponseBase.g.cs Defined new model for handling single custom chart responses.
src/libs/LangSmith/openapi.yaml Updated OpenAPI spec with new endpoints and schemas for chart previews and health checks.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant ChartsClient
    participant API

    Client->>ChartsClient: Request chart preview
    ChartsClient->>API: POST /api/v1/charts/preview
    API-->>ChartsClient: Response with chart preview data
    ChartsClient-->>Client: Return preview data
Loading

🐇✨
In fields of code where rabbits play,
New charts and endpoints hop today.
With models bright and methods clear,
Our API's path is now sincere.
Let's dance with data, charts in sight,
A warren of joy, in code’s delight! 🌸


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot enabled auto-merge August 22, 2024 01:20
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Update README with installation instructions and usage examples Aug 22, 2024
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Outside diff range, codebase verification and nitpick comments (10)
src/libs/LangSmith/Generated/LangSmith.Models.CustomChartPreviewRequest.g.cs (4)

6-8: Add meaningful class documentation.

The class summary is empty. Consider adding a description to improve code readability and maintainability.

 /// <summary>
-/// 
+/// Represents a request for a custom chart preview.
 /// </summary>

11-13: Add meaningful property documentation for BucketInfo.

The property summary is empty. Consider adding a description to improve code readability and maintainability.

 /// <summary>
-/// 
+/// Contains information about the bucket configuration for the chart.
 /// </summary>

18-20: Add meaningful property documentation for Chart.

The property summary is empty. Consider adding a description to improve code readability and maintainability.

 /// <summary>
-/// 
+/// Defines the chart configuration for preview.
 /// </summary>

25-27: Add meaningful property documentation for AdditionalProperties.

The property summary is empty. Consider adding a description to improve code readability and maintainability.

 /// <summary>
 /// Additional properties that are not explicitly defined in the schema
+/// and can be used for custom extensions.
 /// </summary>
src/libs/LangSmith/Generated/LangSmith.Models.CustomChartsRequestBase.g.cs (4)

8-10: Add meaningful class documentation.

The class summary is empty. Consider adding a description to improve code readability and maintainability.

 /// <summary>
-/// 
+/// Represents the base request for custom charts.
 /// </summary>

19-21: Add meaningful property documentation for StartTime.

The property summary is empty. Consider adding a description to improve code readability and maintainability.

 /// <summary>
-/// 
+/// Specifies the start time for the chart data.
 /// </summary>

27-29: Add meaningful property documentation for EndTime.

The property summary is empty. Consider adding a description to improve code readability and maintainability.

 /// <summary>
-/// 
+/// Specifies the end time for the chart data, which can be a DateTime or an object.
 /// </summary>

33-35: Add meaningful property documentation for Stride.

The property summary is empty. Consider adding a description to improve code readability and maintainability.

 /// <summary>
-/// 
+/// Defines the stride or interval for the chart data.
 /// </summary>
src/libs/LangSmith/Generated/LangSmith.Models.SingleCustomChartResponse.g.cs (2)

Line range hint 6-8: Add meaningful class documentation.

The class summary is empty. Consider adding a description to improve code readability and maintainability.

 /// <summary>
-/// 
+/// Represents the response for a single custom chart.
 /// </summary>

13-15: Add meaningful property documentation for Data.

The property summary is empty. Consider adding a description to improve code readability and maintainability.

 /// <summary>
-/// 
+/// Contains the data points for the custom chart.
 /// </summary>
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 733f18b and 96f0507.

Files selected for processing (9)
  • src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadChartPreviewApiV1ChartsPreviewPost.g.cs (1 hunks)
  • src/libs/LangSmith/Generated/LangSmith.LangSmithApi.OkApiV1OkGet.g.cs (5 hunks)
  • src/libs/LangSmith/Generated/LangSmith.Models.CustomChartCreatePreview.g.cs (1 hunks)
  • src/libs/LangSmith/Generated/LangSmith.Models.CustomChartPreviewRequest.g.cs (1 hunks)
  • src/libs/LangSmith/Generated/LangSmith.Models.CustomChartsRequestBase.g.cs (1 hunks)
  • src/libs/LangSmith/Generated/LangSmith.Models.OkApiV1OkGetResponse.g.cs (1 hunks)
  • src/libs/LangSmith/Generated/LangSmith.Models.SingleCustomChartResponse.g.cs (2 hunks)
  • src/libs/LangSmith/Generated/LangSmith.Models.SingleCustomChartResponseBase.g.cs (1 hunks)
  • src/libs/LangSmith/openapi.yaml (8 hunks)
Additional context used
GitHub Check: Test / Build, test and publish
src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadChartPreviewApiV1ChartsPreviewPost.g.cs

[failure] 94-94:
'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?)


[failure] 94-94:
'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?)


[failure] 94-94:
'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?)


[failure] 94-94:
'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?)


[failure] 94-94:
'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?)

Additional comments not posted (24)
src/libs/LangSmith/Generated/LangSmith.Models.OkApiV1OkGetResponse.g.cs (1)

9-9: Verify the impact of the class name change.

The class name has been changed from OkOkGetResponse to OkApiV1OkGetResponse. Ensure that all references to this class in the codebase are updated accordingly.

Run the following script to verify the class name usage:

Verification successful

Class Name Change Verification Successful

All references to the class OkApiV1OkGetResponse have been updated correctly throughout the codebase. There are no remaining references to the old class name OkOkGetResponse.

  • Files with updated references:
    • src/libs/LangSmith/Generated/JsonSerializerContextTypes.g.cs
    • src/libs/LangSmith/Generated/LangSmith.LangSmithApi.OkApiV1OkGet.g.cs
    • src/libs/LangSmith/Generated/LangSmith.Models.OkApiV1OkGetResponse.g.cs
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all references to the class `OkApiV1OkGetResponse`.

# Test: Search for references to the class. Expect: Only occurrences of the new class name.
rg --type csharp -A 5 $'OkApiV1OkGetResponse'

Length of output: 5103

src/libs/LangSmith/Generated/LangSmith.Models.CustomChartCreatePreview.g.cs (1)

9-16: Verify the usage of the new CustomChartCreatePreview class.

This new class introduces a model with a required Series property. Ensure that this class is correctly utilized in the codebase.

Run the following script to verify the usage of the new class:

Verification successful

Verification Successful: The CustomChartCreatePreview class is correctly utilized in the codebase.

The class is referenced in several parts of the codebase, indicating proper integration:

  • Used in JsonSerializerContextTypes.g.cs as a nullable property.
  • Utilized as a parameter in a method in LangSmith.ChartsClient.ReadChartPreviewApiV1ChartsPreviewPost.g.cs.
  • Required in LangSmith.Models.CustomChartPreviewRequest.g.cs.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all references to the class `CustomChartCreatePreview`.

# Test: Search for references to the class. Expect: Proper usage of the new class.
rg --type csharp -A 5 $'CustomChartCreatePreview'

Length of output: 2956

src/libs/LangSmith/Generated/LangSmith.Models.SingleCustomChartResponseBase.g.cs (1)

9-16: Verify the usage of the new SingleCustomChartResponseBase class.

This new class introduces a model with a required Data property. Ensure that this class is correctly utilized in the codebase.

Run the following script to verify the usage of the new class:

Verification successful

Class SingleCustomChartResponseBase is correctly utilized in the codebase.

The SingleCustomChartResponseBase class is used in methods related to chart preview operations and is part of the JSON serialization context. The required Data property is likely being handled appropriately within these contexts.

  • File: src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadChartPreviewApiV1ChartsPreviewPost.g.cs
    • Method: ReadChartPreviewApiV1ChartsPreviewPostAsync uses SingleCustomChartResponseBase as a return type.
  • File: src/libs/LangSmith/Generated/JsonSerializerContextTypes.g.cs
    • Property: Type582 of type SingleCustomChartResponseBase?.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all references to the class `SingleCustomChartResponseBase`.

# Test: Search for references to the class. Expect: Proper usage of the new class.
rg --type csharp -A 5 $'SingleCustomChartResponseBase'

Length of output: 4322

src/libs/LangSmith/Generated/LangSmith.Models.CustomChartPreviewRequest.g.cs (1)

9-30: LGTM! The code structure is well-organized.

The use of JSON serialization attributes and required properties is appropriate.

src/libs/LangSmith/Generated/LangSmith.Models.CustomChartsRequestBase.g.cs (1)

11-44: LGTM! The code structure is well-organized.

The use of JSON serialization attributes and required properties is appropriate.

src/libs/LangSmith/Generated/LangSmith.Models.SingleCustomChartResponse.g.cs (1)

Line range hint 19-63: LGTM! The code structure is well-organized.

The use of JSON serialization attributes and required properties is appropriate.

src/libs/LangSmith/Generated/LangSmith.LangSmithApi.OkApiV1OkGet.g.cs (5)

8-9: Method signature change approved.

The method PrepareOkApiV1OkGetArguments has been renamed to align with the new API versioning strategy.


10-12: Method signature change approved.

The method PrepareOkApiV1OkGetRequest has been renamed to align with the new API versioning strategy.


13-14: Method signature change approved.

The method ProcessOkApiV1OkGetResponse has been renamed to align with the new API versioning strategy.


17-19: Method signature change approved.

The method ProcessOkApiV1OkGetResponseContent has been renamed to align with the new API versioning strategy.


Line range hint 27-79: Method and logic changes approved.

The method OkApiV1OkGetAsync has been updated to align with the new API versioning strategy, including changes to the request URI.

src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadChartPreviewApiV1ChartsPreviewPost.g.cs (5)

8-10: Method signature approved.

The method PrepareReadChartPreviewApiV1ChartsPreviewPostArguments is consistent with the naming conventions and intended functionality.


11-14: Method signature approved.

The method PrepareReadChartPreviewApiV1ChartsPreviewPostRequest is consistent with the naming conventions and intended functionality.


15-17: Method signature approved.

The method ProcessReadChartPreviewApiV1ChartsPreviewPostResponse is consistent with the naming conventions and intended functionality.


19-22: Method signature approved.

The method ProcessReadChartPreviewApiV1ChartsPreviewPostResponseContent is consistent with the naming conventions and intended functionality.


106-120: Method logic approved.

The overloaded method ReadChartPreviewApiV1ChartsPreviewPostAsync correctly constructs a request object and calls the main method.

src/libs/LangSmith/openapi.yaml (8)

7770-7799: New endpoint /api/v1/charts/preview added successfully.

The POST method for obtaining a chart preview is well-defined with appropriate request and response schemas.


8003-8012: New health check endpoint /api/v1/ok added successfully.

The GET method is appropriately defined for health checks with a 200 status code.


8000-8002: No changes detected in security schemes.

The security schemes remain consistent with the rest of the file.


10284-10294: New schema CustomChartCreatePreview added successfully.

The schema is well-defined with a required series property.


10317-10327: New schema CustomChartPreviewRequest added successfully.

The schema is well-defined with required properties bucket_info and chart.


10584-10610: New schema CustomChartsRequestBase added successfully.

The schema is well-defined with properties for time management, including start_time, end_time, and stride.


16270-16282: Schema SingleCustomChartResponse updated successfully.

The data property is now required, ensuring consistent response structure.


16310-16317: New schema SingleCustomChartResponseBase added successfully.

The schema is well-defined with a required data property.

Comment on lines +31 to +95
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) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the type error in deserialization.

The type NullableSingleCustomChartResponseBase does not exist in SourceGenerationContext. Ensure the correct type is used for deserialization.

Apply this diff to fix the type error:

 return
-  global::System.Text.Json.JsonSerializer.Deserialize(__content, global::LangSmith.SourceGenerationContext.Default.NullableSingleCustomChartResponseBase) ??
+  global::System.Text.Json.JsonSerializer.Deserialize(__content, global::LangSmith.SourceGenerationContext.Default.SingleCustomChartResponseBase) ??
  throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
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) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
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.SingleCustomChartResponseBase) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
Tools
GitHub Check: Test / Build, test and publish

[failure] 94-94:
'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?)


[failure] 94-94:
'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?)


[failure] 94-94:
'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?)


[failure] 94-94:
'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?)


[failure] 94-94:
'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?)

@HavenDV HavenDV closed this Aug 22, 2024
auto-merge was automatically disabled August 22, 2024 09:50

Pull request was closed

@HavenDV HavenDV deleted the bot/update-openapi_202408220119 branch August 22, 2024 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant