Repository navigation
refactor(specs): extract source object from behaviour object - #7074
Conversation
💥 Breaking changes detected !!Either this PR or a previous PR not released yet introduced breaking changes, be careful when merging. ✔️ Code generated!
📊 Benchmark resultsBenchmarks performed on the method using a mock server, the results might not reflect the real-world performance.
|
7c252e6 to
562f663
Compare
562f663 to
98700b2
Compare
gavinwade12
left a comment
There was a problem hiding this comment.
I don't quite understand the breaking changes message - are there actually any, and if so, are they just for java@21?
98700b2 to
32f92a1
Compare
|
Breaking changes are the followings:
There are little chances that customers are using it. |
| type: string | ||
| description: | | ||
| Ordering to apply on the items retrieved from the external provider. 'default' uses the relevance ranking from the Algolia retrieval step. 'providerDefined' uses the ordering returned by the external provider. | ||
| enum: ['default', 'providerDefined'] |
There was a problem hiding this comment.
We should have added an alias to default. Sounds weird to call it default and then set providerDefined as default 😬
There was a problem hiding this comment.
and also userDefined is accepted between here and External source as well
There was a problem hiding this comment.
@aiordache The API client is expected to reflect the API exactely.
Does this differ from the API behaviour ?
@ben-kalmus As stated already here:
providerDefined: Uses the ordering returned by the external provider. This corresponds to theuserDefinedordering forexternalsource types.
This is coming from the RFC.
My understanding is that userDefined is not allowed in ExternalProvider source.
@aiordache can you confirm ?
There was a problem hiding this comment.
Had a quick look, we don't seem to have any validation on the ordering, if not set, it defaults to providerDefined: https://github.com/algolia/metis/blob/378e0c6a745f8c869a100163ca6ff4700b04ac1f/modules/services/api/internal/compositions/schema/source.go#L209
Raised a ticket to only allow default (I'd introduce here an alias algoliaDefined to make it less confusing) and providerDefined: https://algolia.atlassian.net/browse/CMP-976
…(generated) [skip ci] Co-authored-by: Clara Muller <5667350+ClaraMuller@users.noreply.github.com>
algolia/api-clients-automation#7074 Co-authored-by: algolia-api-clients-automation-bot[bot] <288895823+algolia-api-clients-automation-bot[bot]@users.noreply.github.com> Co-authored-by: Clara Muller <5667350+ClaraMuller@users.noreply.github.com>
algolia/api-clients-automation#7074 Co-authored-by: algolia-api-clients-automation-bot[bot] <288895823+algolia-api-clients-automation-bot[bot]@users.noreply.github.com> Co-authored-by: Clara Muller <5667350+ClaraMuller@users.noreply.github.com>
algolia/api-clients-automation#7074 Co-authored-by: algolia-api-clients-automation-bot[bot] <288895823+algolia-api-clients-automation-bot[bot]@users.noreply.github.com> Co-authored-by: Clara Muller <5667350+ClaraMuller@users.noreply.github.com>
algolia/api-clients-automation#7074 Co-authored-by: algolia-api-clients-automation-bot[bot] <288895823+algolia-api-clients-automation-bot[bot]@users.noreply.github.com> Co-authored-by: Clara Muller <5667350+ClaraMuller@users.noreply.github.com>
algolia/api-clients-automation#7074 Co-authored-by: algolia-api-clients-automation-bot[bot] <288895823+algolia-api-clients-automation-bot[bot]@users.noreply.github.com> Co-authored-by: Clara Muller <5667350+ClaraMuller@users.noreply.github.com>
algolia/api-clients-automation#7074 Co-authored-by: algolia-api-clients-automation-bot[bot] <288895823+algolia-api-clients-automation-bot[bot]@users.noreply.github.com> Co-authored-by: Clara Muller <5667350+ClaraMuller@users.noreply.github.com>
algolia/api-clients-automation#7074 Co-authored-by: algolia-api-clients-automation-bot[bot] <288895823+algolia-api-clients-automation-bot[bot]@users.noreply.github.com> Co-authored-by: Clara Muller <5667350+ClaraMuller@users.noreply.github.com>
algolia/api-clients-automation#7074 Co-authored-by: algolia-api-clients-automation-bot[bot] <288895823+algolia-api-clients-automation-bot[bot]@users.noreply.github.com> Co-authored-by: Clara Muller <5667350+ClaraMuller@users.noreply.github.com>
algolia/api-clients-automation#7074 Co-authored-by: algolia-api-clients-automation-bot[bot] <288895823+algolia-api-clients-automation-bot[bot]@users.noreply.github.com> Co-authored-by: Clara Muller <5667350+ClaraMuller@users.noreply.github.com>
algolia/api-clients-automation#7074 Co-authored-by: algolia-api-clients-automation-bot[bot] <288895823+algolia-api-clients-automation-bot[bot]@users.noreply.github.com> Co-authored-by: Clara Muller <5667350+ClaraMuller@users.noreply.github.com>
algolia/api-clients-automation#7074 Co-authored-by: algolia-api-clients-automation-bot[bot] <288895823+algolia-api-clients-automation-bot[bot]@users.noreply.github.com> Co-authored-by: Clara Muller <5667350+ClaraMuller@users.noreply.github.com>
🧭 What and Why
🎟 JIRA Ticket: None
Refactors the Composition API spec's schema structure to prepare for future behaviours beyond
injection/multifeed.Groups the existing behaviours under a common
behaviour/directory, then extracts the actual source-type definitions (search,recommend,external,externalProvider) into asource/directory as canonical, context-free base schemasm reusable by any future behaviour instead of being duplicated per context.Changes included:
injection/multifeedschema components under a newcomponents/behaviour/directory (pure reorg, no schema change)baseSearchSource,baseRecommendSource,baseExternalSource,baseExternalProviderSource) intocomponents/source/, deduplicating what were previously separate near-identicalmain/injectedItemschemas per source type🧪 Test
CI