Skip to content

Commit 19e962f

Browse files
committed
chore: improve Event property
- correctly expand `anyOf` for events - add a maxItems to auctions array - CategoryDisjunctions incorrectly refers to `minimum` instead of `minLength`
1 parent 047976c commit 19e962f

File tree

1 file changed

+17
-28
lines changed

1 file changed

+17
-28
lines changed

topsort-api-v2.yml

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ components:
631631
items:
632632
type: string
633633
description: A category ID.
634-
minimum: 1
634+
minLength: 1
635635
minItems: 1
636636
Device:
637637
type: string
@@ -833,6 +833,8 @@ components:
833833
oneOf:
834834
- $ref: "#/components/schemas/SponsoredListingsAuction"
835835
- $ref: "#/components/schemas/BannersAuction"
836+
minItems: 1
837+
maxItems: 5
836838
RankingRequest:
837839
type: object
838840
description: |
@@ -1911,45 +1913,28 @@ components:
19111913
EventsRequest:
19121914
type: object
19131915
additionalProperties: false
1914-
properties:
1915-
impressions:
1916+
minProperties: 1
1917+
anyOf:
1918+
- title: Impressions
19161919
type: array
1917-
items:
1918-
$ref: "#/components/schemas/Impression"
1920+
$ref: "#/components/schemas/Impression"
19191921
minItems: 0
19201922
maxItems: 50
1921-
clicks:
1923+
- title: Clicks
19221924
type: array
1923-
items:
1924-
$ref: "#/components/schemas/Click"
1925+
$ref: "#/components/schemas/Click"
19251926
minItems: 0
19261927
maxItems: 50
1927-
purchases:
1928+
- title: Purchases
19281929
type: array
1929-
items:
1930-
$ref: "#/components/schemas/Purchase"
1930+
$ref: "#/components/schemas/Purchase"
19311931
minItems: 0
19321932
maxItems: 50
1933-
pageviews:
1933+
- title: Page views
19341934
type: array
1935-
items:
1936-
$ref: "#/components/schemas/Pageview"
1935+
$ref: "#/components/schemas/Pageview"
19371936
minItems: 0
19381937
maxItems: 50
1939-
minProperties: 1
1940-
anyOf:
1941-
- properties:
1942-
impressions:
1943-
minItems: 1
1944-
- properties:
1945-
clicks:
1946-
minItems: 1
1947-
- properties:
1948-
purchases:
1949-
minItems: 1
1950-
- properties:
1951-
pageviews:
1952-
minItems: 1
19531938
examples:
19541939
- impressions:
19551940
- id: eb874c98-bf4d-40a9-ae6d-fcf4cecb535c
@@ -2010,6 +1995,7 @@ components:
20101995
deviceType: mobile
20111996
channel: onsite
20121997
Impression:
1998+
title: Impression
20131999
type: object
20142000
description: >
20152001
An impression means a promotable has become visible to the consumer. For promoted entities,
@@ -2069,6 +2055,7 @@ components:
20692055
examples:
20702056
- onsite
20712057
Click:
2058+
title: Click
20722059
description: >
20732060
A click is sent to Topsort when the consumer has clicked on a promotable. For promoted
20742061
entities, include the `resolvedBidId` field from the `/v2/auctions` response. For unpromoted
@@ -2134,6 +2121,7 @@ components:
21342121
examples:
21352122
- onsite
21362123
Purchase:
2124+
title: Purchase
21372125
description: >
21382126
A purchase is sent to Topsort once a marketplace customer places an order. These events are
21392127
used to measure the effectiveness of an ad campaign.
@@ -2218,6 +2206,7 @@ components:
22182206
examples:
22192207
- eb874c98-bf4d-40a9-ae6d-fcf4cecb535c
22202208
Pageview:
2209+
title: Pageview
22212210
type: object
22222211
description: >
22232212
A page view represents the navigation of the user throughout the page. They are considered

0 commit comments

Comments
 (0)