-
Notifications
You must be signed in to change notification settings - Fork 28
refactor(specs): extract composition injection behaviour into its own directory
#5683
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
Open
ClaraMuller
wants to merge
3
commits into
main
Choose a base branch
from
clara/feat/add-injection-metadata
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+241
−239
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127 changes: 0 additions & 127 deletions
127
specs/composition/common/schemas/components/Injection.yml
This file was deleted.
Oops, something went wrong.
111 changes: 111 additions & 0 deletions
111
specs/composition/common/schemas/components/injection/Behaviour.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| InjectionBehaviour: | ||
| title: injection | ||
| type: object | ||
| additionalProperties: false | ||
| properties: | ||
| main: | ||
| title: main | ||
| type: object | ||
| additionalProperties: false | ||
| properties: | ||
| source: | ||
| title: compositionSource | ||
| type: object | ||
| additionalProperties: false | ||
| properties: | ||
| search: | ||
| title: compositionSourceSearch | ||
| type: object | ||
| additionalProperties: false | ||
| properties: | ||
| index: | ||
| type: string | ||
| description: Composition Main Index name. | ||
| example: Products | ||
| params: | ||
| $ref: './QueryParams.yml#/mainInjectionQueryParameters' | ||
| required: | ||
| - index | ||
| required: | ||
| - search | ||
| required: | ||
| - source | ||
| injectedItems: | ||
| type: array | ||
| description: list of injected items of the current Composition. | ||
| minItems: 0 | ||
| maxItems: 2 | ||
| items: | ||
| $ref: '#/injectedItem' | ||
| deduplication: | ||
| title: deduplication | ||
| type: object | ||
| additionalProperties: false | ||
| description: Deduplication configures the methods used to resolve duplicate items between main search results and injected group results. | ||
| properties: | ||
| positioning: | ||
| $ref: '#/dedupPositioning' | ||
| required: | ||
| - positioning | ||
| required: | ||
| - main | ||
|
|
||
| injectedItem: | ||
| type: object | ||
| additionalProperties: false | ||
| properties: | ||
| key: | ||
| type: string | ||
| description: injected Item unique identifier. | ||
| source: | ||
| description: Search source to be used to inject items into result set. | ||
| $ref: '#/injectedItemSource' | ||
| position: | ||
| type: integer | ||
| minimum: 0 | ||
| maximum: 19 | ||
| length: | ||
| type: integer | ||
| minimum: 0 | ||
| maximum: 20 | ||
| metadata: | ||
| title: injectedItemMetadata | ||
| type: object | ||
| description: Used to add metadata to the results of the injectedItem. | ||
| properties: | ||
| hits: | ||
| title: injectedItemHitsMetadata | ||
| type: object | ||
| description: Adds the provided metadata to each injected hit via an `_extra` attribute. | ||
| properties: | ||
| addItemKey: | ||
| type: boolean | ||
| description: When true, the `_injectedItemKey` field is set in the `_extra` object of each affected hit. | ||
| extra: | ||
| type: object | ||
| additionalProperties: true | ||
| description: The user-defined key-value pairs that will be placed in the `_extra` field of each affected hit. | ||
| required: | ||
| - key | ||
| - source | ||
| - position | ||
| - length | ||
|
|
||
| injectedItemSource: | ||
| oneOf: | ||
| - $ref: './Source.yml#/SearchSource' | ||
| - $ref: './Source.yml#/ExternalSource' | ||
|
|
||
| dedupPositioning: | ||
| type: string | ||
| enum: | ||
| - highest | ||
| - highestInjected | ||
| description: | | ||
| Deduplication positioning configures how a duplicate result should be resolved between an injected item and main search results. | ||
| Current configuration supports: | ||
| - 'highest': always select the item in the highest position, and remove duplicates that appear lower in the results. | ||
| - 'highestInjected': duplicate result will be moved to its highest possible injected position, but not higher. | ||
| If a duplicate appears higher in main search results, it will be removed to stay it's intended group position (which could be lower than main). | ||
| example: highest | ||
| default: highestInjected | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could try renaming this to
Injectionto avoid the breaking changeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@millotp normally this fix is in my second commit 👍