From e1b886a030f8414c33856f77fc78bacdf82c8cea Mon Sep 17 00:00:00 2001 From: Pablo Reszczynski Date: Thu, 23 Feb 2023 14:32:52 -0300 Subject: [PATCH 1/7] Add better documentation and examples for URLs in winning entities --- topsort-api-v2.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/topsort-api-v2.yml b/topsort-api-v2.yml index 6986dae..7de3f34 100644 --- a/topsort-api-v2.yml +++ b/topsort-api-v2.yml @@ -485,8 +485,11 @@ components: id: type: string description: |- - The marketplace's ID of the winning entity, depending on the target of the campaign. - example: p_Mfk15 + The marketplace's ID of the winning entity or an URL for a banner destination page, depending on the target of the campaign. + examples: + - p_Mfk15 + - https://your.marketplace.com/products/path-to-a-product-page + - intent://your.markketplace.com/_u/products/path-to-a-product-page_#Intent;package=com.marketplace.android;scheme=https;end resolvedBidId: type: string description: An opaque Topsort ID to be used when this item is interacted with. From d75bf1abc6d7bcecada296d8acb114e975ecb75e Mon Sep 17 00:00:00 2001 From: Pablo Reszczynski Date: Thu, 23 Feb 2023 14:41:20 -0300 Subject: [PATCH 2/7] Fix examples --- topsort-api-v2.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/topsort-api-v2.yml b/topsort-api-v2.yml index 7de3f34..2c98933 100644 --- a/topsort-api-v2.yml +++ b/topsort-api-v2.yml @@ -487,9 +487,18 @@ components: description: |- The marketplace's ID of the winning entity or an URL for a banner destination page, depending on the target of the campaign. examples: - - p_Mfk15 - - https://your.marketplace.com/products/path-to-a-product-page - - intent://your.markketplace.com/_u/products/path-to-a-product-page_#Intent;package=com.marketplace.android;scheme=https;end + product: + value: p_Mfk15 + summary: A product ID. + vendor: + value: my-vendor-name + summary: A vendor ID. + URL: + value: https://your.marketplace.com/products/path-to-a-product-page + summary: A web URL. + DeepLink: + value: intent://your.markketplace.com/_u/products/path-to-a-product-page_#Intent;package=com.marketplace.android;scheme=https;end + summary: A mobile app deeplink. resolvedBidId: type: string description: An opaque Topsort ID to be used when this item is interacted with. From 03790bcb44a765e1923824d9af76bd665ff1dbad Mon Sep 17 00:00:00 2001 From: Pablo Reszczynski Date: Thu, 23 Feb 2023 14:46:02 -0300 Subject: [PATCH 3/7] up openapi version --- .github/workflows/check-specs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-specs.yml b/.github/workflows/check-specs.yml index a41c5ea..b39511e 100644 --- a/.github/workflows/check-specs.yml +++ b/.github/workflows/check-specs.yml @@ -19,7 +19,7 @@ jobs: ${{ runner.os }}-node- - name: Install Dependencies - run: npm install -g prettier@2.5.1 @openapitools/openapi-generator-cli@2.4.24 + run: npm install -g prettier@2.5.1 @openapitools/openapi-generator-cli@2.5.2 - name: Check Formatting run: prettier --check . From e47f96b7f34055639a00d03046e35bfaeb718259 Mon Sep 17 00:00:00 2001 From: Pablo Reszczynski Date: Thu, 23 Feb 2023 14:50:58 -0300 Subject: [PATCH 4/7] up openapi version --- topsort-api-v2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/topsort-api-v2.yml b/topsort-api-v2.yml index 2c98933..372937f 100644 --- a/topsort-api-v2.yml +++ b/topsort-api-v2.yml @@ -1,4 +1,4 @@ -openapi: 3.0.1 +openapi: 3.1.0 info: title: Topsort Endpoints API Reference description: >- From c890b6651443c5df1b92d166efbff014877a5868 Mon Sep 17 00:00:00 2001 From: Pablo Reszczynski Date: Thu, 23 Feb 2023 15:13:27 -0300 Subject: [PATCH 5/7] try another way --- topsort-api-v2.yml | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/topsort-api-v2.yml b/topsort-api-v2.yml index 372937f..7dfd93b 100644 --- a/topsort-api-v2.yml +++ b/topsort-api-v2.yml @@ -486,23 +486,32 @@ components: type: string description: |- The marketplace's ID of the winning entity or an URL for a banner destination page, depending on the target of the campaign. - examples: - product: - value: p_Mfk15 - summary: A product ID. - vendor: - value: my-vendor-name - summary: A vendor ID. - URL: - value: https://your.marketplace.com/products/path-to-a-product-page - summary: A web URL. - DeepLink: - value: intent://your.markketplace.com/_u/products/path-to-a-product-page_#Intent;package=com.marketplace.android;scheme=https;end - summary: A mobile app deeplink. + # examples: + # product: + # value: p_Mfk15 + # summary: A product ID. + # vendor: + # value: my-vendor-name + # summary: A vendor ID. + # URL: + # value: https://your.marketplace.com/products/path-to-a-product-page + # summary: A web URL. + # DeepLink: + # value: intent://your.markketplace.com/_u/products/path-to-a-product-page_#Intent;package=com.marketplace.android;scheme=https;end + # summary: A mobile app deeplink. resolvedBidId: type: string description: An opaque Topsort ID to be used when this item is interacted with. example: WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0= + examples: + winnerProduct: + value: {"rank": 1, "type": "product", "id": "p_Mfk15", "resolvedBidId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0="} + winnerVendor: {"rank": 1, "type": "vendor", "id": "https://your.marketplace.com/products/path-to-a-product-page", "resolvedBidId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0="} + winnerUrl: {"rank": 1, "type": "url", "id": "", "resolvedBidId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0="} + winnerDeepLink: {"rank": 1, "type": "url", "id": "intent://your.markketplace.com/_u/products/path-to-a-product-page_#Intent;package=com.marketplace.android;scheme=https;end", "resolvedBidId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0="} + + + BannersWinner: type: object From 90c8fe1774c02c93bfb86d253880a43d9918d510 Mon Sep 17 00:00:00 2001 From: Pablo Reszczynski Date: Thu, 23 Feb 2023 15:36:49 -0300 Subject: [PATCH 6/7] prettier --- topsort-api-v2.yml | 48 +++++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/topsort-api-v2.yml b/topsort-api-v2.yml index 7dfd93b..f9ca732 100644 --- a/topsort-api-v2.yml +++ b/topsort-api-v2.yml @@ -486,32 +486,40 @@ components: type: string description: |- The marketplace's ID of the winning entity or an URL for a banner destination page, depending on the target of the campaign. - # examples: - # product: - # value: p_Mfk15 - # summary: A product ID. - # vendor: - # value: my-vendor-name - # summary: A vendor ID. - # URL: - # value: https://your.marketplace.com/products/path-to-a-product-page - # summary: A web URL. - # DeepLink: - # value: intent://your.markketplace.com/_u/products/path-to-a-product-page_#Intent;package=com.marketplace.android;scheme=https;end - # summary: A mobile app deeplink. resolvedBidId: type: string description: An opaque Topsort ID to be used when this item is interacted with. example: WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0= examples: winnerProduct: - value: {"rank": 1, "type": "product", "id": "p_Mfk15", "resolvedBidId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0="} - winnerVendor: {"rank": 1, "type": "vendor", "id": "https://your.marketplace.com/products/path-to-a-product-page", "resolvedBidId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0="} - winnerUrl: {"rank": 1, "type": "url", "id": "", "resolvedBidId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0="} - winnerDeepLink: {"rank": 1, "type": "url", "id": "intent://your.markketplace.com/_u/products/path-to-a-product-page_#Intent;package=com.marketplace.android;scheme=https;end", "resolvedBidId": "WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0="} - - - + value: + { + 'rank': 1, + 'type': 'product', + 'id': 'p_Mfk15', + 'resolvedBidId': 'WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=', + } + winnerVendor: + { + 'rank': 1, + 'type': 'vendor', + 'id': 'https://your.marketplace.com/products/path-to-a-product-page', + 'resolvedBidId': 'WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=', + } + winnerUrl: + { + 'rank': 1, + 'type': 'url', + 'id': '', + 'resolvedBidId': 'WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=', + } + winnerDeepLink: + { + 'rank': 1, + 'type': 'url', + 'id': 'intent://your.markketplace.com/_u/products/path-to-a-product-page_#Intent;package=com.marketplace.android;scheme=https;end', + 'resolvedBidId': 'WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=', + } BannersWinner: type: object From 352bc450482d2b3f0ba6637d96d3520c0a719c54 Mon Sep 17 00:00:00 2001 From: Pablo Reszczynski Date: Thu, 23 Feb 2023 15:40:48 -0300 Subject: [PATCH 7/7] add missing identifier --- topsort-api-v2.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/topsort-api-v2.yml b/topsort-api-v2.yml index f9ca732..6783eac 100644 --- a/topsort-api-v2.yml +++ b/topsort-api-v2.yml @@ -10,6 +10,7 @@ info: license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html + identifier: Apache-2.0 x-logo: url: https://assets.website-files.com/61a717c57f45d64e5e24eebf/61ee6ccc3f6a684756ef6dec_logo.svg backgroundColor: '#fff'