File tree Expand file tree Collapse file tree 3 files changed +21
-21
lines changed 
specs/composition-full/common Expand file tree Collapse file tree 3 files changed +21
-21
lines changed Original file line number Diff line number Diff line change @@ -46,9 +46,17 @@ externalInjectedItem:
4646    objectID :
4747      type : string 
4848    metadata :
49-       $ref : ' ../schemas/components/CompositionBehavior.yml#/metadata ' 
49+       $ref : ' #/injectedItemMetadata ' 
5050  description : | 
5151    An objectID injected into an external source. 
5252   required :
5353    - objectID 
5454  example : {'objectID': 'my-object-1', 'metadata': {'my-field': 'my-value'}} 
55+ 
56+ injectedItemMetadata :
57+   type : object 
58+   additionalProperties : true 
59+   description : | 
60+     User defined key-values that will be added to injected item in the response. 
61+     This is identical to Hits metadata which is defined in Composition or Composition Rule, with the benefit of being set at runtime. 
62+    example : {'my-value': 'my-field'} 
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ injectedItem:
5555      description : injected Item unique identifier. 
5656    source :
5757      description : Search source to be used to inject items into result set. 
58-       $ref : ' #/injectionSource ' 
58+       $ref : ' #/injectedItemSource ' 
5959    position :
6060      type : integer 
6161      minimum : 0 
@@ -72,7 +72,7 @@ injectedItem:
7272    - position 
7373    - length 
7474
75- injectionSource :
75+ injectedItemSource :
7676  oneOf :
7777    - $ref : ' ./InjectionSource.yml#/search' 
7878    - $ref : ' ./InjectionSource.yml#/external' 
Original file line number Diff line number Diff line change @@ -3,35 +3,27 @@ search:
33  description : Injected items will originate from a search request performed on the specified index. 
44  type : object 
55  additionalProperties : false 
6-   allOf :
7-     - $ref : ' #/baseSource' 
8-     - type : object 
9-       additionalProperties : false 
6+   properties :
7+     index :
8+       type : string 
9+       description : Composition Index name. 
10+       example : Products 
11+     params :
12+       $ref : ' ./Injection.yml#/injectedItemsQueryParameters' 
13+   required :
14+     - index 
1015
1116external :
1217  title : injectedItemExternalSource 
1318  description : Injected items will originate from externally provided objectIDs (that must exist in the index) given at runtime in the run request payload. 
1419  type : object 
1520  additionalProperties : false 
1621  allOf :
17-     - $ref : ' #/baseSource ' 
22+     - $ref : ' #/search ' 
1823  properties :
1924    ordering :
2025      $ref : ' #/externalOrdering' 
2126
22- baseSource :
23-   type : object 
24-   additionalProperties : false 
25-   properties :
26-     index :
27-       type : string 
28-       description : Composition Index name. 
29-       example : Products 
30-     params :
31-       $ref : ' ./Injection.yml#/injectedItemsQueryParameters' 
32-   required :
33-     - index 
34- 
3527externalOrdering :
3628  enum : ['default', 'user-defined'] 
3729  default : ' default' 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments