Skip to content

feat(specs): update try transformation specs for no-code #4974

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

Merged
merged 2 commits into from
Jun 12, 2025

Conversation

mehmetaligok
Copy link
Contributor

@mehmetaligok mehmetaligok commented Jun 11, 2025

🧭 What and Why

A follow-up to #4901.

This PR adds no-code transformations support to the try endpoint specs.

Changes included:

  • The try endpoint spec is updated.

@algolia-bot
Copy link
Collaborator

algolia-bot commented Jun 11, 2025

✔️ Code generated!

Name Link
🪓 Triggered by 04df79b8d3510c850205a2a3d805393ccb4014da
🍃 Generated commit 911a0c03b7e466bd7a1f68e00cef8a3720d43252
🌲 Generated branch generated/feat/update-try-transformation-specs-for-no-code
📊 Benchmark results

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

Language Req/s
go 1752
javascript 1659
php 1516
csharp 1392
python 1077
java 1024
ruby 784
swift 373
scala 23

@mehmetaligok mehmetaligok force-pushed the feat/update-try-transformation-specs-for-no-code branch from 0b7a400 to 437cf0c Compare June 11, 2025 17:15
@mehmetaligok mehmetaligok self-assigned this Jun 12, 2025
@mehmetaligok mehmetaligok marked this pull request as ready for review June 12, 2025 06:46
@mehmetaligok mehmetaligok requested a review from a team as a code owner June 12, 2025 06:46
Comment on lines 168 to 169
- type
- input
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should require them here
We could create another object where it's required, but here, it would be a bc I think

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I didn't get it.

The code field was previously required; now, instead of the code field, we want to use type and input. So that is why I made them required, because the endpoint wouldn't work without them.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, but if people use this prop in their code, it will not work anymore.
For example, if you have this in your JS code:

const transformation: Transformation = { code: '' }

Typescript will be yelling at you because you don't implement type and input, when you'll upgrade to the latest version

Copy link
Collaborator

Choose a reason for hiding this comment

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

it still works with the legacy payload right ? @Fluf22 is right, this is a breaking change if you put them as required

Copy link
Collaborator

Choose a reason for hiding this comment

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

I sent my message without seeing your second one thomas

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay. I didnt aware of this will effect and break the generated code. Btw, this is also the case for create payload so I need to revert that change.

But what is the recommendation in here? Make nothing required?

(The api supports legacy payload and the new payload at the same time. So there is no breaking change in the actual API.)

Copy link
Contributor

Choose a reason for hiding this comment

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

@millotp I'd suggest creating a second payload and using a oneOf?
But maybe this would be bc in some languages?

Copy link
Contributor

Choose a reason for hiding this comment

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

Only other option is to make nothing required, yes

Copy link
Collaborator

Choose a reason for hiding this comment

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

having a oneOf is breaking too, I would suggest making everything optional for now, and in a month or so, make the new payload required and leave code as optional.
We don't have a lot of way to deal with breaking changes because of the SLA...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated with fa35a7b

@mehmetaligok mehmetaligok requested review from millotp and Fluf22 June 12, 2025 10:23
@millotp millotp merged commit 6031284 into main Jun 12, 2025
28 checks passed
@millotp millotp deleted the feat/update-try-transformation-specs-for-no-code branch June 12, 2025 16:16
algolia-bot added a commit that referenced this pull request Jun 12, 2025
…erated) [skip ci]

Co-authored-by: Mehmet Ali Gok <33124154+mehmetaligok@users.noreply.github.com>
algolia-bot added a commit to algolia/algoliasearch-client-csharp that referenced this pull request Jun 12, 2025
algolia/api-clients-automation#4974

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Mehmet Ali Gok <33124154+mehmetaligok@users.noreply.github.com>
algolia-bot added a commit to algolia/algoliasearch-client-go that referenced this pull request Jun 12, 2025
algolia/api-clients-automation#4974

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Mehmet Ali Gok <33124154+mehmetaligok@users.noreply.github.com>
algolia-bot added a commit to algolia/algoliasearch-client-java that referenced this pull request Jun 12, 2025
algolia/api-clients-automation#4974

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Mehmet Ali Gok <33124154+mehmetaligok@users.noreply.github.com>
algolia-bot added a commit to algolia/algoliasearch-client-javascript that referenced this pull request Jun 12, 2025
algolia/api-clients-automation#4974

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Mehmet Ali Gok <33124154+mehmetaligok@users.noreply.github.com>
algolia-bot added a commit to algolia/algoliasearch-client-kotlin that referenced this pull request Jun 12, 2025
algolia/api-clients-automation#4974

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Mehmet Ali Gok <33124154+mehmetaligok@users.noreply.github.com>
algolia-bot added a commit to algolia/algoliasearch-client-php that referenced this pull request Jun 12, 2025
algolia/api-clients-automation#4974

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Mehmet Ali Gok <33124154+mehmetaligok@users.noreply.github.com>
algolia-bot added a commit to algolia/algoliasearch-client-python that referenced this pull request Jun 12, 2025
algolia/api-clients-automation#4974

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Mehmet Ali Gok <33124154+mehmetaligok@users.noreply.github.com>
algolia-bot added a commit to algolia/algoliasearch-client-ruby that referenced this pull request Jun 12, 2025
algolia/api-clients-automation#4974

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Mehmet Ali Gok <33124154+mehmetaligok@users.noreply.github.com>
algolia-bot added a commit to algolia/algoliasearch-client-scala that referenced this pull request Jun 12, 2025
algolia/api-clients-automation#4974

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Mehmet Ali Gok <33124154+mehmetaligok@users.noreply.github.com>
algolia-bot added a commit to algolia/algoliasearch-client-swift that referenced this pull request Jun 12, 2025
algolia/api-clients-automation#4974

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Mehmet Ali Gok <33124154+mehmetaligok@users.noreply.github.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.

4 participants