Skip to content

refactor(specs): group files for composition api #5122

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 4 commits into from
Jul 16, 2025

Conversation

ClaraMuller
Copy link
Contributor

@ClaraMuller ClaraMuller commented Jul 16, 2025

🧭 What and Why

🎟 JIRA Ticket: Work preparation for https://algolia.atlassian.net/browse/CMP-484

Composition API team is preparing update of the API clients with writes endpoints (see full list of endpoints here).
Goals of this PR is to cleanup / refactor the current Open API spec to ease the integrations of the new endpoints.

Changes included:

➡️ No API client should be updated with this PR, it purely about reorganising code.

Create 3 new directories within composition-full/schemas:

  • components: to group reusable models together
  • requestBodies: to group and identify request bodies easily
  • response: to group and identify request response easily

Stack PRs

Next steps

  • Create composition-full/params to add an interface between shared parameter between Composition API and Search API.

Review tips

PR can be review commit by commit for ease.

🧪 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 July 16, 2025 09:04
@algolia-bot
Copy link
Collaborator

algolia-bot commented Jul 16, 2025

✔️ Code generated!

Name Link
🪓 Triggered by a74f06cd53cc23eb680f866259d1784c82c653b2
🍃 Generated commit 20264bb5ef0debff48e1e07135a1618aad1ef96c
🌲 Generated branch generated/clara/refact/group-files-in-dir
📊 Benchmark results

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

Language Req/s
go 1785
javascript 1643
php 1477
csharp 1307
python 1092
java 1084
ruby 780
swift 621
scala 23

@ClaraMuller ClaraMuller changed the title Clara/refact/group files in dir refactor(specs): group files for composition api Jul 16, 2025
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.

clean

Copy link
Member

Choose a reason for hiding this comment

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

Does this still differ from the regular search params? If not, we can remove it and use the search spec instead

Copy link
Contributor Author

@ClaraMuller ClaraMuller Jul 16, 2025

Choose a reason for hiding this comment

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

The parameter are the same than the Search API but the usahe is not allowed in all part of the API.
We are way more restricted.
I will try to clarify the usage in my next PR

type: object
additionalProperties: false
properties:
attributesToRetrieve:
Copy link
Member

Choose a reason for hiding this comment

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

if those are expected to be exactly the same as the one from the search API, you can import them from either the Search Params or the Index Settings, see recommend spec example

Copy link
Member

Choose a reason for hiding this comment

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

ah maybe it's tackled by Create composition-full/params to add an interface between shared parameter between Composition API and Search API.?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I am planning to add a clear interface to avoid code dupplication.

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.

🧹

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.

🧹 but with ✅

@shortcuts shortcuts merged commit e7dfb35 into main Jul 16, 2025
30 checks passed
@shortcuts shortcuts deleted the clara/refact/group-files-in-dir branch July 16, 2025 13:55
algolia-bot added a commit that referenced this pull request Jul 16, 2025
algolia-bot added a commit to algolia/algoliasearch-client-javascript that referenced this pull request Jul 16, 2025
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