Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- uses: actions/checkout@v4
- name: Install Vacuum
env:
version: 0.17.8
version: 0.20.2
run:
curl -Ls "https://github.com/daveshanley/vacuum/releases/download/v${{ env.version
}}/vacuum_${{ env.version }}_linux_x86_64.tar.gz" | sudo tar -x -z -C /usr/local/bin
Expand Down
97 changes: 55 additions & 42 deletions topsort-api-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,44 +84,44 @@
- results
examples:
- results:
- winners:
- rank: 1
type: product
id: p_Mfk11
resolvedBidId: WyJiX01mazExIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTMyNjYtY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0==
campaignId: 82588593-85c5-47c0-b125-07e315b7f2b3
error: false

Check warning on line 93 in topsort-api-v2.yml

View workflow job for this annotation

GitHub Actions / Redocly

no-invalid-schema-examples

Example value must conform to the schema: `0` property tag "resultType" must be string.
- winners:
- rank: 1
type: product
id: p_Mfk15
resolvedBidId: WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=
campaignId: 4bcc6093-f367-4df2-aa1b-7c1674dd6441
- rank: 2
type: product
id: p_PJbnN
resolvedBidId: WyJlX1BKYm5OIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=
campaignId: a72e4e43-55b5-4d08-81bb-cbb57df59c72
error: false

Check warning on line 105 in topsort-api-v2.yml

View workflow job for this annotation

GitHub Actions / Redocly

no-invalid-schema-examples

Example value must conform to the schema: `1` property tag "resultType" must be string.
- winners:
- rank: 1
type: product
id: p_PJbnN
resolvedBidId: WyJlX1BKYm5OIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwiYmFubmVyQWRzIiwiZGVmYXVsdCIsIiJd
campaignId: 1156ef4e-0109-4190-ac97-4436c82358d2
asset:
- url: https://topsort.cdnprovider.com/lhs-banner-image-for-p_PJbnN-1x.png
content:
headingText:
"A banner for Topsort with a product image and a shop now button"
bannerText: "Topsort has the best tech!"
bannerTextColour: "48a94c"
heroImage: "https://assets.imageurl.io/s/85d2d333-eed5-44d7-b131-8851d59f0574"
heroImageAltText: "Topsort product image"
error: false

Check warning on line 121 in topsort-api-v2.yml

View workflow job for this annotation

GitHub Actions / Redocly

no-invalid-schema-examples

Example value must conform to the schema: `2` property tag "resultType" must be string.
- results:
- winners: []
error: false

Check warning on line 124 in topsort-api-v2.yml

View workflow job for this annotation

GitHub Actions / Redocly

no-invalid-schema-examples

Example value must conform to the schema: `0` property tag "resultType" must be string.
"400":
$ref: "#/components/responses/BadRequest"
"401":
Expand Down Expand Up @@ -302,7 +302,7 @@

- **Purchases** — a user created an order.

- **Pageviews** — a user visited a page.
- **Page views** — a user visited a page.

Interactions require either a `resolvedBidId`, for sponsored events coming from the
`/v2/auctions` response,
Expand Down Expand Up @@ -584,8 +584,8 @@
minLength: 1
minItems: 1
examples:
- c_men_clothing

Check warning on line 587 in topsort-api-v2.yml

View workflow job for this annotation

GitHub Actions / Redocly

no-invalid-schema-examples

Example value must conform to the schema: type must be array.
- c_shoes

Check warning on line 588 in topsort-api-v2.yml

View workflow job for this annotation

GitHub Actions / Redocly

no-invalid-schema-examples

Example value must conform to the schema: type must be array.
- type: object
title: Category Disjunctions
description: Multiple disjunctions of categories for the purpose of running an auction.
Expand All @@ -605,8 +605,8 @@
minItems: 1
maxItems: 5
examples:
- c_red

Check warning on line 608 in topsort-api-v2.yml

View workflow job for this annotation

GitHub Actions / Redocly

no-invalid-schema-examples

Example value must conform to the schema: type must be array.
- c_blue

Check warning on line 609 in topsort-api-v2.yml

View workflow job for this annotation

GitHub Actions / Redocly

no-invalid-schema-examples

Example value must conform to the schema: type must be array.
SingleCategory:
type: object
title: Single Category
Expand All @@ -631,7 +631,7 @@
items:
type: string
description: A category ID.
minimum: 1
minLength: 1
minItems: 1
Device:
type: string
Expand Down Expand Up @@ -833,6 +833,10 @@
oneOf:
- $ref: "#/components/schemas/SponsoredListingsAuction"
- $ref: "#/components/schemas/BannersAuction"
discriminator:
propertyName: "type"
minItems: 1
maxItems: 5
RankingRequest:
type: object
description: |
Expand Down Expand Up @@ -1910,46 +1914,11 @@
- vendor
EventsRequest:
type: object
additionalProperties: false
properties:
impressions:
type: array
items:
$ref: "#/components/schemas/Impression"
minItems: 0
maxItems: 50
clicks:
type: array
items:
$ref: "#/components/schemas/Click"
minItems: 0
maxItems: 50
purchases:
type: array
items:
$ref: "#/components/schemas/Purchase"
minItems: 0
maxItems: 50
pageviews:
type: array
items:
$ref: "#/components/schemas/Pageview"
minItems: 0
maxItems: 50
minProperties: 1
anyOf:
- properties:
impressions:
minItems: 1
- properties:
clicks:
minItems: 1
- properties:
purchases:
minItems: 1
- properties:
pageviews:
minItems: 1
- $ref: "#/components/schemas/ImpressionsArray"
- $ref: "#/components/schemas/ClicksArray"
- $ref: "#/components/schemas/PurchasesArray"
- $ref: "#/components/schemas/PageViewsArray"
examples:
- impressions:
- id: eb874c98-bf4d-40a9-ae6d-fcf4cecb535c
Expand Down Expand Up @@ -2010,6 +1979,7 @@
deviceType: mobile
channel: onsite
Impression:
title: Impression
type: object
description: >
An impression means a promotable has become visible to the consumer. For promoted entities,
Expand Down Expand Up @@ -2068,7 +2038,18 @@
- instore
examples:
- onsite
ImpressionsArray:
title: Impressions
description: An array of impression events
properties:
impressions:
type: array
minItems: 0
maxItems: 50
items:
$ref: "#/components/schemas/Impression"
Click:
title: Click
description: >
A click is sent to Topsort when the consumer has clicked on a promotable. For promoted
entities, include the `resolvedBidId` field from the `/v2/auctions` response. For unpromoted
Expand Down Expand Up @@ -2133,7 +2114,18 @@
- instore
examples:
- onsite
ClicksArray:
title: Clicks
description: An array of click events
properties:
clicks:
type: array
minItems: 0
maxItems: 50
items:
$ref: "#/components/schemas/Click"
Purchase:
title: Purchase
description: >
A purchase is sent to Topsort once a marketplace customer places an order. These events are
used to measure the effectiveness of an ad campaign.
Expand Down Expand Up @@ -2208,6 +2200,16 @@
minLength: 1
examples:
- v_8fj2D
PurchasesArray:
title: Purchases
description: An array of purchase events
properties:
purchases:
type: array
minItems: 0
maxItems: 50
items:
$ref: "#/components/schemas/Purchase"
EventIdentifier:
type: string
description: >
Expand All @@ -2217,7 +2219,8 @@
minLength: 1
examples:
- eb874c98-bf4d-40a9-ae6d-fcf4cecb535c
Pageview:
PageView:
title: Page View
type: object
description: >
A page view represents the navigation of the user throughout the page. They are considered
Expand Down Expand Up @@ -2257,6 +2260,16 @@
- instore
examples:
- onsite
PageViewsArray:
title: Page views
description: An array of page view events
properties:
pageviews:
type: array
minItems: 0
maxItems: 50
items:
$ref: "#/components/schemas/PageView"
securitySchemes:
HTTPBearer:
description: A valid API key generated in Topsort's UI.
Expand Down
Loading