Skip to content

Commit

Permalink
Merge pull request #77 from adzerk/akirasato/sc-58684/update-api-spec…
Browse files Browse the repository at this point in the history
…ification-to-include-ad-attribution

[sc-58684] Ad AttributionSettings
  • Loading branch information
akiradev authored Dec 17, 2024
2 parents fb82a58 + 5c1935b commit 3920218
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 2 deletions.
7 changes: 6 additions & 1 deletion management/ad.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ paths:
type: integer
format: int32
nullable: true
AttributionSettings:
$ref: './schemas/ad.yaml#/schemas/AttributionSettings'
nullable: true
responses:
200:
description: The newly created Ad
Expand Down Expand Up @@ -374,7 +377,9 @@ paths:
type: integer
format: int32
nullable: true

AttributionSettings:
$ref: './schemas/ad.yaml#/schemas/AttributionSettings'
nullable: true
responses:
200:
description: The updated Ad
Expand Down
111 changes: 110 additions & 1 deletion management/schemas/ad.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
schemas:

Ad:
type: object
required:
Expand Down Expand Up @@ -124,6 +123,9 @@ schemas:
type: integer
format: int32
nullable: true
AttributionSettings:
$ref: '#/schemas/AttributionSettings'
nullable: true
Created:
type: string
format: date-time
Expand Down Expand Up @@ -194,3 +196,110 @@ schemas:
format: int32
Creative:
$ref: './creative.yaml#/schemas/NestedCreativeOutput'

AttributableItemSameProductWithProductId:
type: object
properties:
MatchType:
type: string
enum: [SameProduct]
ProductUri:
type: string
ProductId:
type: string
MerchantId:
type: string
Promoted:
type: boolean
required:
- MatchType
- ProductId
additionalProperties: false

AttributableItemSameProductWithProductUri:
type: object
properties:
MatchType:
type: string
enum: [SameProduct]
ProductUri:
type: string
ProductId:
type: string
MerchantId:
type: string
Promoted:
type: boolean
required:
- MatchType
- ProductUri
additionalProperties: false

AttributableItemSameCategoryBrand:
type: object
properties:
MatchType:
type: string
enum: [SameCategoryBrand]
CategoryId:
type: string
BrandId:
type: string
MerchantId:
type: string
Promoted:
type: boolean
required:
- MatchType
- CategoryId
- BrandId
additionalProperties: false

AttributableItemSameBrand:
type: object
properties:
MatchType:
type: string
enum: [SameBrand]
BrandId:
type: string
MerchantId:
type: string
Promoted:
type: boolean
required:
- MatchType
- BrandId
additionalProperties: false

AttributableItemSameMerchant:
type: object
properties:
MatchType:
type: string
enum: [SameMerchant]
MerchantId:
type: string
Promoted:
type: boolean
required:
- MatchType
- MerchantId
additionalProperties: false

AttributionSettings:
type: object
properties:
AttributableItems:
type: array
items:
oneOf:
- $ref: '#/schemas/AttributableItemSameProductWithProductId'
- $ref: '#/schemas/AttributableItemSameProductWithProductUri'
- $ref: '#/schemas/AttributableItemSameCategoryBrand'
- $ref: '#/schemas/AttributableItemSameBrand'
- $ref: '#/schemas/AttributableItemSameMerchant'
discriminator:
propertyName: MatchType
required:
- AttributableItems

0 comments on commit 3920218

Please sign in to comment.