Skip to content

Conversation

ClaraMuller
Copy link
Contributor

🧭 What and Why

What

This PR refactors the Composition API client specs to introduce a dedicated Search.yml file that aggregates all Search API resource references.
Composition API should continue to expose resources from other clients as we plan to grow in API you can directly call. Having a clear separation of concern will make the evolution of the Composition API client easier.

Why

  • Avoids duplicating direct $ref calls to Search API schemas in multiple files (all parameter that are shared between run and injection: filters, hitsPerPage, etc...).
  • Simplifies maintenance: future updates to Search API specs can be managed in one place.
  • Makes the dependency between Composition and Search explicit and easier to track.

Changes included:

  • Created a new file specs/composition-full/common/params/Search.yml containing all Search API–related $ref definitions used in Composition.
  • Updated Injection.yml and RunParams.yml to reference this new file instead of directly pointing to common/schemas/IndexSettings.yml, common/schemas/SearchParams.yml (the difference means nothing for Composition API) or complexe one like common/schemas/SearchParams.yml#/baseSearchParamsWithoutQuery/properties/facets
  • This change is a refactor only, no functional behavior is altered.

🧪 Test

  • CI
  • Locally run
    • yarn cli build specs all
    • yarn cli build clients javascript

@ClaraMuller ClaraMuller requested a review from a team as a code owner August 26, 2025 11:22
@algolia-bot
Copy link
Collaborator

algolia-bot commented Aug 26, 2025

No code generated

If you believe code should've been generated, please, report the issue.

📊 Benchmark results

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

Language Req/s
javascript 1636
go 1622
php 1471
csharp 1321
python 1158
java 1018
ruby 800
swift 503
scala 23

@ClaraMuller
Copy link
Contributor Author

ClaraMuller commented Aug 26, 2025

This PR is basically the revert of this commit: c004dd2 from this merged PR #5125.

I saw there was question about it but I wanted to re-open the conversation as I believe this change make sense in a context of maintainability in the futur.

@ClaraMuller ClaraMuller requested a review from a team August 26, 2025 11:25
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.

2 participants