Skip to content

Commit 7d63a9d

Browse files
committed
TASK: Updating RAML types, Postman and OAS definition
1 parent 4055fc1 commit 7d63a9d

17 files changed

+351
-327
lines changed

bruno/api/Project/Product-projections/Product Projection Search/ByProjectKeyProductProjectionsSearchGet.bru

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
meta {
2-
name: Search Products by get
2+
name: Search Products by GET
33
type: http
44
seq: 342
55
}
@@ -12,18 +12,18 @@ get {
1212

1313

1414
query {
15+
~markMatchingVariants:
16+
~/text.[a-z]{2}(-[A-Z]{2})?/:
1517
~fuzzy:
1618
~fuzzyLevel:
17-
~markMatchingVariants:
18-
~filter:
19-
~filter.facets:
2019
~filter.query:
20+
~filter:
2121
~facet:
22-
~/text.[a-z]{2}(-[A-Z]{2})?/:
22+
~filter.facets:
23+
~expand:
2324
~sort:
2425
~limit:
2526
~offset:
26-
~withTotal:
2727
~staged:
2828
~priceCurrency:
2929
~priceCountry:
@@ -32,7 +32,6 @@ query {
3232
~priceChannel:
3333
~localeProjection:
3434
~storeProjection:
35-
~expand:
3635
}
3736

3837
script:post-response {

bruno/api/Project/Product-projections/Product Projection Search/ByProjectKeyProductProjectionsSearchPost.bru

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
meta {
2-
name: Search Products by post
2+
name: Search Products by POST
33
type: http
44
seq: 341
55
}

oas/api/openapi.yaml

Lines changed: 42 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -27324,11 +27324,6 @@ paths:
2732427324
"503":
2732527325
$ref: '#/components/responses/errorable_503'
2732627326
/{projectKey}/product-projections/search:
27327-
description: |-
27328-
This endpoint provides high performance search queries over ProductProjections. The query result contains the
27329-
ProductProjections for which at least one ProductVariant matches the search query. This means that variants can
27330-
be included in the result also for which the search query does not match. To determine which ProductVariants match
27331-
the search query, the returned ProductProjections include the additional field isMatchingVariant.
2733227327
parameters:
2733327328
- name: projectKey
2733427329
in: path
@@ -27342,7 +27337,8 @@ paths:
2734227337
- "view_published_products:{projectKey}"
2734327338
operationId: ByProjectKeyProductProjectionsSearchPost
2734427339
description: |-
27345-
Product Projection Search
27340+
For implementing funnel search on Product Listing Pages where users select multiple filters, use this POST method.
27341+
To avoid URL length restrictions, this method passes the same query parameters as defined in the [GET](ctp:api:endpoint:/{projectKey}/product-projections/search:GET) method, within the request body in URL-encoded format.
2734627342
requestBody:
2734727343
content:
2734827344
application/x-www-form-urlencoded:
@@ -27379,32 +27375,45 @@ paths:
2737927375
- "view_published_products:{projectKey}"
2738027376
operationId: ByProjectKeyProductProjectionsSearchGet
2738127377
description: |-
27382-
Product Projection Search
27378+
This method appends query parameters to the URL.
27379+
The maximum allowed URL length is 8192 characters.
27380+
Exceeding this limit will result in URL truncation, potentially leading to unexpected results.
27381+
For funnel searches on Product Listing Pages, where users select multiple filters, we recommend the [POST](ctp:api:endpoint:/{projectKey}/product-projections/search:POST) method which passes the query parameters within the request body, avoiding URL length restrictions.
2738327382
parameters:
27384-
- name: fuzzy
27383+
- name: markMatchingVariants
27384+
x-annotation-default: false
2738527385
in: query
2738627386
required: false
2738727387
style: form
2738827388
schema:
2738927389
type: "boolean"
2739027390
explode: true
27391-
- name: fuzzyLevel
27391+
- name: /text.[a-z]{2}(-[A-Z]{2})?/
2739227392
in: query
2739327393
required: false
2739427394
style: form
2739527395
schema:
27396-
type: "number"
27397-
format: "double"
27396+
type: "array"
27397+
items:
27398+
type: "string"
2739827399
explode: true
27399-
- name: markMatchingVariants
27400+
- name: fuzzy
2740027401
x-annotation-default: false
2740127402
in: query
2740227403
required: false
2740327404
style: form
2740427405
schema:
2740527406
type: "boolean"
2740627407
explode: true
27407-
- name: filter
27408+
- name: fuzzyLevel
27409+
in: query
27410+
required: false
27411+
style: form
27412+
schema:
27413+
type: "number"
27414+
format: "double"
27415+
explode: true
27416+
- name: filter.query
2740827417
in: query
2740927418
required: false
2741027419
style: form
@@ -27413,7 +27422,7 @@ paths:
2741327422
items:
2741427423
type: "string"
2741527424
explode: true
27416-
- name: filter.facets
27425+
- name: filter
2741727426
in: query
2741827427
required: false
2741927428
style: form
@@ -27422,7 +27431,7 @@ paths:
2742227431
items:
2742327432
type: "string"
2742427433
explode: true
27425-
- name: filter.query
27434+
- name: facet
2742627435
in: query
2742727436
required: false
2742827437
style: form
@@ -27431,7 +27440,7 @@ paths:
2743127440
items:
2743227441
type: "string"
2743327442
explode: true
27434-
- name: facet
27443+
- name: filter.facets
2743527444
in: query
2743627445
required: false
2743727446
style: form
@@ -27440,7 +27449,7 @@ paths:
2744027449
items:
2744127450
type: "string"
2744227451
explode: true
27443-
- name: /text.[a-z]{2}(-[A-Z]{2})?/
27452+
- name: expand
2744427453
in: query
2744527454
required: false
2744627455
style: form
@@ -27456,7 +27465,7 @@ paths:
2745627465
schema:
2745727466
type: "array"
2745827467
items:
27459-
$ref: '#/components/schemas/Sort'
27468+
type: "string"
2746027469
explode: true
2746127470
- name: limit
2746227471
x-annotation-default: 20
@@ -27476,14 +27485,6 @@ paths:
2747627485
type: "number"
2747727486
format: "double"
2747827487
explode: true
27479-
- name: withTotal
27480-
x-annotation-default: true
27481-
in: query
27482-
required: false
27483-
style: form
27484-
schema:
27485-
type: "boolean"
27486-
explode: true
2748727488
- name: staged
2748827489
x-annotation-default: false
2748927490
in: query
@@ -27545,15 +27546,6 @@ paths:
2754527546
schema:
2754627547
type: "string"
2754727548
explode: true
27548-
- name: expand
27549-
in: query
27550-
required: false
27551-
style: form
27552-
schema:
27553-
type: "array"
27554-
items:
27555-
$ref: '#/components/schemas/Expansion'
27556-
explode: true
2755727549
responses:
2755827550
"200":
2755927551
description: |-
@@ -47356,6 +47348,9 @@ components:
4735647348
allOf:
4735747349
- $ref: '#/components/schemas/ErrorObject'
4735847350
- type: "object"
47351+
required:
47352+
- code
47353+
- message
4735947354
properties:
4736047355
code:
4736147356
type: "string"
@@ -48734,6 +48729,8 @@ components:
4873448729
allOf:
4873548730
- $ref: '#/components/schemas/GraphQLErrorObject'
4873648731
- type: "object"
48732+
required:
48733+
- code
4873748734
properties:
4873848735
code:
4873948736
type: "string"
@@ -73177,21 +73174,20 @@ components:
7317773174
type: "object"
7317873175
required:
7317973176
- count
73180-
- facets
7318173177
- limit
7318273178
- offset
7318373179
- results
7318473180
properties:
7318573181
limit:
7318673182
type: "integer"
7318773183
format: "int64"
73188-
count:
73184+
offset:
7318973185
type: "integer"
7319073186
format: "int64"
73191-
total:
73187+
count:
7319273188
type: "integer"
7319373189
format: "int64"
73194-
offset:
73190+
total:
7319573191
type: "integer"
7319673192
format: "int64"
7319773193
results:
@@ -73507,6 +73503,13 @@ components:
7350773503
- boolean
7350873504
- number
7350973505
x-annotation-package: "Product"
73506+
x-annotation-enumDescriptions:
73507+
text: "For [AttributeTextType](ctp:api:type:AttributeTextType) Attributes.n"
73508+
date: "For [AttributeDateType](ctp:api:type:AttributeDateType) Attributes.n"
73509+
time: "For [AttributeTimeType](ctp:api:type:AttributeTimeType) Attributes.n"
73510+
datetime: "For [AttributeDateTimeType](ctp:api:type:AttributeDateTimeType) Attributes.n"
73511+
boolean: "For [AttributeBooleanType](ctp:api:type:AttributeBooleanType) Attributes.n"
73512+
number: "For [AttributeNumberType](ctp:api:type:AttributeNumberType) Attributes.n"
7351073513
WhitespaceTokenizer:
7351173514
allOf:
7351273515
- $ref: '#/components/schemas/SuggestTokenizer'

uml/api/BaseResource.puml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3955,5 +3955,4 @@ BaseResource --> StoreNameSetMessage #blue;text:blue : "type : StoreNameSet"
39553955
BaseResource --> StoreProductSelectionsChangedMessage #blue;text:blue : "type : StoreProductSelectionsChanged"
39563956
BaseResource --> StoreSupplyChannelsChangedMessage #blue;text:blue : "type : StoreSupplyChannelsChanged"
39573957
BaseResource --> PagedQueryResponse #green;text:green : "results"
3958-
BaseResource --> PagedQueryResponse #green;text:green : "results"
39593958
@enduml

uml/api/FacetRange.puml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,5 @@ interface RangeFacetResult [[RangeFacetResult.svg]] {
2828
ranges: [[FacetRange.svg List<FacetRange>]]
2929
}
3030

31-
FacetRange --> RangeFacetResult #green;text:green : "ranges"
3231
FacetRange --> RangeFacetResult #green;text:green : "ranges"
3332
@enduml

uml/api/FacetResults.puml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,14 @@ interface FacetResults [[FacetResults.svg]] {
1313

1414

1515

16+
interface ProductProjectionPagedSearchResponse [[ProductProjectionPagedSearchResponse.svg]] {
17+
limit: Long
18+
offset: Long
19+
count: Long
20+
total: Long
21+
results: [[ProductProjection.svg List<ProductProjection>]]
22+
facets: [[FacetResults.svg FacetResults]]
23+
}
1624

17-
18-
25+
FacetResults --> ProductProjectionPagedSearchResponse #green;text:green : "facets"
1926
@enduml

uml/api/FacetTerm.puml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,5 @@ interface TermFacetResult [[TermFacetResult.svg]] {
2525
terms: [[FacetTerm.svg List<FacetTerm>]]
2626
}
2727

28-
FacetTerm --> TermFacetResult #green;text:green : "terms"
2928
FacetTerm --> TermFacetResult #green;text:green : "terms"
3029
@enduml

uml/api/ProductProjection.puml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ interface ProductProjectionPagedQueryResponse [[ProductProjectionPagedQueryRespo
5050
}
5151
interface ProductProjectionPagedSearchResponse [[ProductProjectionPagedSearchResponse.svg]] {
5252
limit: Long
53+
offset: Long
5354
count: Long
5455
total: Long
55-
offset: Long
5656
results: [[ProductProjection.svg List<ProductProjection>]]
5757
facets: [[FacetResults.svg FacetResults]]
5858
}
@@ -124,7 +124,6 @@ interface ProductSearchResult [[ProductSearchResult.svg]] {
124124

125125
ProductProjection --> ProductProjectionPagedQueryResponse #green;text:green : "results"
126126
ProductProjection --> ProductProjectionPagedSearchResponse #green;text:green : "results"
127-
ProductProjection --> ProductProjectionPagedSearchResponse #green;text:green : "results"
128127
ProductProjection --> ProductCreatedMessage #green;text:green : "productProjection"
129128
ProductProjection --> ProductDeletedMessage #green;text:green : "currentProjection"
130129
ProductProjection --> ProductPublishedMessage #green;text:green : "productProjection"

uml/api/ProductProjectionPagedSearchResponse.puml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ legend
1010
endlegend
1111
interface ProductProjectionPagedSearchResponse [[ProductProjectionPagedSearchResponse.svg]] {
1212
limit: Long
13+
offset: Long
1314
count: Long
1415
total: Long
15-
offset: Long
1616
results: [[ProductProjection.svg List<ProductProjection>]]
1717
facets: [[FacetResults.svg FacetResults]]
1818
}

uml/api/TermFacetResultType.puml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ enum TermFacetResultType {
99
BOOLEAN
1010
NUMBER
1111
}
12-
13-
12+
interface TermFacetResult [[TermFacetResult.svg]] {
13+
type: [[FacetTypes.svg FacetTypes]]
14+
dataType: [[TermFacetResultType.svg TermFacetResultType]]
15+
missing: Long
16+
total: Long
17+
other: Long
18+
terms: [[FacetTerm.svg List<FacetTerm>]]
19+
}
20+
TermFacetResultType --> TermFacetResult #green;text:green : "dataType"
1421
@enduml

0 commit comments

Comments
 (0)