diff --git a/.github/workflows/lint-tools.yml b/.github/workflows/lint-tools.yml index 43f0d34..24dbe65 100644 --- a/.github/workflows/lint-tools.yml +++ b/.github/workflows/lint-tools.yml @@ -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 diff --git a/topsort-api-v2.yml b/topsort-api-v2.yml index 0053874..3e2bc93 100644 --- a/topsort-api-v2.yml +++ b/topsort-api-v2.yml @@ -302,7 +302,7 @@ paths: - **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, @@ -631,7 +631,7 @@ components: items: type: string description: A category ID. - minimum: 1 + minLength: 1 minItems: 1 Device: type: string @@ -833,6 +833,10 @@ components: oneOf: - $ref: "#/components/schemas/SponsoredListingsAuction" - $ref: "#/components/schemas/BannersAuction" + discriminator: + propertyName: "type" + minItems: 1 + maxItems: 5 RankingRequest: type: object description: | @@ -1913,43 +1917,37 @@ components: additionalProperties: false properties: impressions: + title: Impressions + description: An array of impression events type: array - items: - $ref: "#/components/schemas/Impression" minItems: 0 maxItems: 50 + items: + $ref: "#/components/schemas/Impression" clicks: + title: Clicks + description: An array of click events type: array - items: - $ref: "#/components/schemas/Click" minItems: 0 maxItems: 50 + items: + $ref: "#/components/schemas/Click" purchases: + title: Purchases + description: An array of purchase events type: array - items: - $ref: "#/components/schemas/Purchase" minItems: 0 maxItems: 50 + items: + $ref: "#/components/schemas/Purchase" pageviews: + title: Page views + description: An array of page views 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 + items: + $ref: "#/components/schemas/PageView" examples: - impressions: - id: eb874c98-bf4d-40a9-ae6d-fcf4cecb535c @@ -2010,6 +2008,7 @@ components: deviceType: mobile channel: onsite Impression: + title: Impression type: object description: > An impression means a promotable has become visible to the consumer. For promoted entities, @@ -2069,6 +2068,7 @@ components: examples: - onsite 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 @@ -2134,6 +2134,7 @@ components: examples: - onsite 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. @@ -2217,7 +2218,8 @@ components: 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