Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Conversation

@fern-api
Copy link
Contributor

@fern-api fern-api bot commented Aug 26, 2024

This PR regenerates code to match the latest API Definition.

@fern-api fern-api bot requested a review from fern-support August 26, 2024 19:04
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
Path = $"v2/transcript/{transcriptId}/{formatSlug}",
Path = $"v2/transcript/{transcriptId}/{subtitleFormat}",
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be subtitleFormat.Stringify().

public HttpClient HttpClient { get; init; } = new HttpClient();

/// <summary>
/// The http client used to make requests.
Copy link
Contributor

Choose a reason for hiding this comment

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

This doc comment is incorrect.

},
cancellationToken
);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
Copy link
Contributor

Choose a reason for hiding this comment

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

cancellationToken should be passed to response.Raw.Content.ReadAsStringAsync too

Copy link
Contributor

Choose a reason for hiding this comment

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

Anything that's async usually

Copy link
Contributor

Choose a reason for hiding this comment

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

Also .ConfigureAwait(false)

Copy link
Contributor

Choose a reason for hiding this comment

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

You'll need to use conditional compilation tho:

#if NET6_0_OR_GREATER
        var responseBody = await response.Raw.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
#else
        var responseBody = await response.Raw.Content.ReadAsStringAsync().ConfigureAwait(false);
#endif

@Swimburger Swimburger merged commit d6c4669 into main Aug 26, 2024
@Swimburger Swimburger deleted the fern-bot/08-26-2024-0704PM branch August 26, 2024 20:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants