Skip to content

Conversation

@MarioAlexandruDan
Copy link
Contributor

@MarioAlexandruDan MarioAlexandruDan commented Dec 4, 2025

🧭 What and Why

We should expose derivative of each operation with a WithHTTPInfo suffix that returns the raw HTTP response from the API so that can be evaluated when needed (status code access, for example)

🎟 JIRA Ticket API-136:
https://algolia.atlassian.net/browse/API-136?actionerId=62a8b1d6bf7afc006f3b6d9c&sourceType=assign

Changes included:

  • List changes

🧪 Test

@MarioAlexandruDan MarioAlexandruDan requested a review from a team as a code owner December 4, 2025 13:42
@MarioAlexandruDan MarioAlexandruDan marked this pull request as draft December 4, 2025 13:42
@algolia-bot
Copy link
Collaborator

algolia-bot commented Dec 4, 2025

✔️ Code generated!

Name Link
🪓 Triggered by fd9d4bd0b9eb6d81f875073d61ff8668dd06b500
🍃 Generated commit 387f338be5bd93397ac885c76a0c1ab88aafa9c3
🌲 Generated branch generated/feat/csharp-withhttpinfo-sufix
📊 Benchmark results

Benchmarks performed on the method using a mock server, the results might not reflect the real-world performance.

Language Req/s
csharp 1467

@MarioAlexandruDan MarioAlexandruDan force-pushed the feat/csharp-withhttpinfo-sufix branch from e2cd0a9 to 5706781 Compare December 4, 2025 14:14
@MarioAlexandruDan MarioAlexandruDan force-pushed the feat/csharp-withhttpinfo-sufix branch from f3b5644 to 1e97906 Compare December 4, 2025 14:29
@MarioAlexandruDan MarioAlexandruDan marked this pull request as ready for review December 4, 2025 14:39
Copy link
Collaborator

@Fluf22 Fluf22 left a comment

Choose a reason for hiding this comment

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

This looks great
It would be perfect if we could find a way to test it, next!

Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

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

Looks good at first glance, gg! but @morganleroi knows better

{{#isDeprecated}}
[Obsolete]
{{/isDeprecated}}
public async Task<AlgoliaHttpResponse>{{operationId}}WithHTTPInfoAsync({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}RequestOptions options = null, CancellationToken cancellationToken = default)
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if the async should be before the WithHTTPInfo or not

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I kept WithHTTPInfo before async in Java templates too

@MarioAlexandruDan MarioAlexandruDan enabled auto-merge (squash) December 5, 2025 08:44
@MarioAlexandruDan MarioAlexandruDan enabled auto-merge (squash) December 5, 2025 09:46
@MarioAlexandruDan MarioAlexandruDan merged commit 0e5f42b into main Dec 5, 2025
15 checks passed
@MarioAlexandruDan MarioAlexandruDan deleted the feat/csharp-withhttpinfo-sufix branch December 5, 2025 09:58
algolia-bot added a commit that referenced this pull request Dec 5, 2025
… [skip ci]

Co-authored-by: Mario-Alexandru Dan <marioalexandrudan@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-csharp that referenced this pull request Dec 5, 2025
algolia/api-clients-automation#5715

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Mario-Alexandru Dan <marioalexandrudan@gmail.com>
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.

5 participants