Skip to content

fix(specs): more accurate composition behavior typing#5892

Merged
gavinwade12 merged 1 commit intomainfrom
fix/compositions/behavior-typing
Jan 29, 2026
Merged

fix(specs): more accurate composition behavior typing#5892
gavinwade12 merged 1 commit intomainfrom
fix/compositions/behavior-typing

Conversation

@gavinwade12
Copy link
Copy Markdown
Contributor

@gavinwade12 gavinwade12 commented Jan 28, 2026

🧭 What and Why

This PR changes the typing for composition behaviors to make it clear that either injection or multifeed may be specified, but not both.

Slack thread: https://algolia.slack.com/archives/C06TE5GB5R6/p1769606821341719?thread_ts=1768297965.225399&cid=C06TE5GB5R6

🎟 JIRA Ticket: CMP-683

Changes included:

  • Split compositionBehavior type into a oneOf with specified sub-types with required properties

🧪 Test

  • yarn cli generate javascript composition yields something equivalent to type CompositionBehavior = {injection: Injection} | {multifeed: Multifeed}; instead of type CompositionBehavior = {injection?: Injection; multifeed?: Multifeed};

@gavinwade12 gavinwade12 requested a review from a team as a code owner January 28, 2026 14:50
@algolia-bot
Copy link
Copy Markdown
Collaborator

algolia-bot commented Jan 28, 2026

💥 Breaking changes detected !!

Either this PR or a previous PR not released yet introduced breaking changes, be careful when merging.
You can find the details in the 'client java@21' CI job.

✔️ Code generated!

Name Link
🪓 Triggered by 597ac55b661b849a7ac64b91a51ad0988ae49631
🍃 Generated commit 1288376edd25728bff2c9ebf27b867c54ea80795
🌲 Generated branch generated/fix/compositions/behavior-typing
📊 Benchmark results

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

Language Req/s
javascript 2463
go 2283
php 1947
python 1415
csharp 1386
java 1201
ruby 997
swift 727
scala 23

@Fluf22 Fluf22 force-pushed the fix/compositions/behavior-typing branch from 1342e22 to d5ca66f Compare January 28, 2026 15:02
@gavinwade12 gavinwade12 force-pushed the fix/compositions/behavior-typing branch from d5ca66f to a6f8a8f Compare January 29, 2026 17:21
@gavinwade12 gavinwade12 merged commit 2925f56 into main Jan 29, 2026
68 of 70 checks passed
@gavinwade12 gavinwade12 deleted the fix/compositions/behavior-typing branch January 29, 2026 22:22
algolia-bot added a commit that referenced this pull request Jan 29, 2026
…ted) [skip ci]

Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-csharp that referenced this pull request Jan 29, 2026
algolia/api-clients-automation#5892

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-dart that referenced this pull request Jan 29, 2026
algolia/api-clients-automation#5892

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-go that referenced this pull request Jan 29, 2026
algolia/api-clients-automation#5892

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-java that referenced this pull request Jan 29, 2026
algolia/api-clients-automation#5892

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-javascript that referenced this pull request Jan 29, 2026
algolia/api-clients-automation#5892

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-kotlin that referenced this pull request Jan 29, 2026
algolia/api-clients-automation#5892

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-php that referenced this pull request Jan 29, 2026
algolia/api-clients-automation#5892

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-python that referenced this pull request Jan 29, 2026
algolia/api-clients-automation#5892

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-ruby that referenced this pull request Jan 29, 2026
algolia/api-clients-automation#5892

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-scala that referenced this pull request Jan 29, 2026
algolia/api-clients-automation#5892

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@gmail.com>
algolia-bot added a commit to algolia/algoliasearch-client-swift that referenced this pull request Jan 29, 2026
algolia/api-clients-automation#5892

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Gavin Wade <gavin.wade12@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.

3 participants