Skip to content

Commit

Permalink
feat: updated examples for swagger (#3526)
Browse files Browse the repository at this point in the history
  • Loading branch information
aanshi07 authored Jul 31, 2024
1 parent 44baab9 commit 5e22fa0
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 265 deletions.
50 changes: 18 additions & 32 deletions swagger/components/examples/processor/failure.yaml
Original file line number Diff line number Diff line change
@@ -1,40 +1,26 @@
metadata:
sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC'
workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg'
namespace: ''
instanceId: '1'
sourceType: 'HTTP'
sourceCategory: ''
trackingPlanId: ''
trackingPlanVersion: 0
sourceTpConfig: null
mergedTpConfig: null
destinationId: '2JIqVoWNvSOHa9ppKOqSo4hPuc0'
jobRunId: ''
destinationId: '2JIqVoWNvSOHa9ppKOqSoxxx'
jobId: 1
sourceBatchId: ''
sourceJobId: ''
sourceJobRunId: ''
sourceTaskId: ''
sourceTaskRunId: ''
recordId: null
destinationType: 'PINTEREST_TAG'
messageId: 'cededd59-671c-4a2e-a89a-6461ed662ab9'
oauthAccessToken: ''
messageIds: null
rudderId: '<<>>anon-id<<>>testUser'
receivedAt: '2023-01-01T14:15:41.731+05:30'
eventName: 'Product Viewed'
eventType: 'track'
sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591'
destinationDefinitionId: ''
sourceId: '2ifsnRxzoONtZeIoGxgNWsr4xx'
sourceCategory: ''
attemptNum: 0
receivedAt: '2024-07-17T16:45:40.114+05:30'
createdAt: '2024-07-17T11:15:41.140Z'
firstAttemptedAt: ''
transformAt: 'router'
workspaceId: '2hSS1hZ8kuCpUZAAYsQucAFdxxx'
secret: null
workerAssignedTime: '2024-07-17T16:45:41.264239+05:30'
dontBatch: false
traceparent: ''
statusCode: 400
error: Random is not mapped in UI. Make sure to map the event in UI or enable the 'send as custom event' setting
error: Missing required value from 'userIdOnly'
statTags:
errorCategory: 'platform'
implementation: 'cdkV2'
destType: 'PINTEREST_TAG'
errorCategory: 'dataValidation'
implementation: 'native'
destType: 'JUNE'
module: 'destination'
feature: 'processor'
destinationId: '2JIqVoWNvSOHa9ppKOqSo4hPuc0'
workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg'
destinationId: '2JIqVoWNvSOHa9ppKOqSoxxx'
79 changes: 22 additions & 57 deletions swagger/components/examples/processor/success.yaml
Original file line number Diff line number Diff line change
@@ -1,72 +1,37 @@
output:
body:
JSON:
event_time: 1672564081
event_source_url: https://www.website.com/product/path
action_source: offline
event_id: 6ee69cf1-ce37-4287-9a0f-8b8453219082
app_id: ''
advertiser_id: 'advertiserId123'
user_data:
em:
- b9ecbd1d999a0f17d442a08971caeea92d770dba89ac900688ecede233d652df
ph:
- 92b5072176e723878b5e06ff3ca61898e4eb74e8c46642a0f2db800b17364ab0
ge:
- 62c66a7a5dd70c3146618063c344e531e6d4b59e379808443ce962b3abd63c5a
ln:
- dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251
fn:
- 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
client_ip_address: '[::1]'
custom_data:
num_items: 11
content_ids:
- '123'
contents:
- quantity: 11
item_price: '13.49'
event_name: add_to_cart
anonymousId: 'abc123'
userId: '123'
timestamp: '2022-01-20T13:39:21.032Z'
JSON_ARRAY: {}
XML: {}
FORM: {}
version: '1'
type: REST
method: POST
endpoint: https://ct.pinterest.com/events/v3
endpoint: https://api.june.so/api/identify
headers:
Content-Type: application/json
params: {}
files: {}
userId: ''
metadata:
sourceId: 27O0bmEEx3GgfmEhZHUcPwJQVWC
workspaceId: 27O0bhB6p5ehfOWeeZlOSsSDTLg
namespace: ''
instanceId: '1'
sourceType: HTTP
sourceCategory: ''
trackingPlanId: ''
trackingPlanVersion: 0
sourceTpConfig:
mergedTpConfig:
destinationId: 2JIqVoWNvSOHa9ppKOqSo4hPuc0
jobRunId: ''
jobId: 1
sourceBatchId: ''
sourceJobId: ''
sourceJobRunId: ''
sourceTaskId: ''
sourceTaskRunId: ''
recordId:
destinationType: PINTEREST_TAG
messageId: 6ee69cf1-ce37-4287-9a0f-8b8453219082
oauthAccessToken: ''
messageIds:
rudderId: '<<>>anon-id<<>>testUser'
receivedAt: '2023-01-01T14:38:01.482+05:30'
eventName: Product Added
eventType: track
sourceDefinitionId: 1b6gJdqOPOCadT3cddw8eidV591
destinationDefinitionId: ''
metadata:
userId: '<<>>12345<<>>12345'
jobId: 1
sourceId: '2ifsnRxzoONtZeIoGxgNWsr4xx'
sourceCategory: ''
destinationId: '2JIqVoWNvSOHa9ppKOqSxxx'
attemptNum: 0
receivedAt: '2024-07-17T16:45:40.114+05:30'
createdAt: '2024-07-17T11:15:41.140Z'
firstAttemptedAt: ''
transformAt: 'router'
workspaceId: '2hSS1hZ8kuCpUZAAYsQucAFdxxx'
secret: null
workerAssignedTime: '2024-07-17T16:45:41.264239+05:30'
dontBatch: false
traceparent: ''
eventName: 'Product Added'
eventType: 'track'
statusCode: 200
143 changes: 23 additions & 120 deletions swagger/components/examples/router/failure.yaml
Original file line number Diff line number Diff line change
@@ -1,130 +1,33 @@
metadata:
- sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC'
workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg'
namespace: ''
instanceId: '1'
sourceType: 'HTTP'
- jobId: 2
destinationId: '2JIqVoWNvSOHa9ppKOqSoxxx'
sourceId: '2ifsnRxzoONtZeIoGxgNWsr4xx'
sourceCategory: ''
trackingPlanId: ''
trackingPlanVersion: 0
sourceTpConfig: null
mergedTpConfig: null
destinationId: '2JIqVoWNvSOHa9ppKOqSo4hPuc0'
jobRunId: ''
jobId: 1
sourceBatchId: ''
sourceJobId: ''
sourceJobRunId: ''
sourceTaskId: ''
sourceTaskRunId: ''
recordId: null
destinationType: 'PINTEREST_TAG'
messageId: 'cededd59-671c-4a2e-a89a-6461ed662ab9'
oauthAccessToken: ''
messageIds: null
rudderId: '<<>>anon-id<<>>testUser'
receivedAt: '2023-01-01T14:15:41.731+05:30'
eventName: 'Product Viewed'
eventType: 'track'
sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591'
destinationDefinitionId: ''
attemptNum: 0
receivedAt: '2024-07-17T16:45:40.114+05:30'
createdAt: '2024-07-17T11:15:41.140Z'
firstAttemptedAt: ''
transformAt: 'router'
workspaceId: '2hSS1hZ8kuCpUZAAYsQucAFdxxx'
secret: null
workerAssignedTime: '2024-07-17T16:45:41.264239+05:30'
dontBatch: false
traceparent: ''
destination:
ID: '2JIqVoWNvSOHa9ppKOqSo4hPuc0'
Name: 'Pinterest-test'
DestinationDefinition:
ID: '1s0w2bMAleYngscZRgH1ExynlpT'
Name: 'PINTEREST_TAG'
DisplayName: 'Pinterest Tag'
Config:
cdkV2TestThreshold: 1
cdkV2Enabled: true
destConfig:
defaultConfig:
- 'tagId'
- 'appId'
- 'advertiserId'
- 'sendingUnHashedData'
- 'enableDeduplication'
- 'deduplicationKey'
- 'customProperties'
- 'eventsMapping'
- 'enhancedMatch'
- 'blacklistedEvents'
- 'whitelistedEvents'
- 'eventFilteringOption'
web:
- 'useNativeSDK'
- 'oneTrustCookieCategories'
excludeKeys: []
includeKeys:
- 'tagId'
- 'advertiserId'
- 'appId'
- 'customProperties'
- 'eventsMapping'
- 'enhancedMatch'
- 'enableDeduplication'
- 'deduplicationKey'
- 'blacklistedEvents'
- 'whitelistedEvents'
- 'oneTrustCookieCategories'
- 'eventFilteringOption'
saveDestinationResponse: false
secretKeys: []
supportedSourceTypes:
- 'android'
- 'ios'
- 'web'
- 'unity'
- 'amp'
- 'cloud'
- 'warehouse'
- 'reactnative'
- 'flutter'
- 'cordova'
transformAt: 'router'
transformAtV1: 'router'
ResponseRules: {}
ID: '1s0w2bMAleYngscZRgH1Exx'
Name: 'abc_tag'
Config:
advertiserId: 'advertiserId123'
appId: ''
apiVersion: 'newApi'
adAccountId: 'accountId123'
conversionToken: 'conversionToken123'
sendAsCustomEvent: false
blacklistedEvents:
- eventName: ''
customProperties:
- properties: ''
deduplicationKey: ''
enableDeduplication: false
enhancedMatch: false
eventFilteringOption: 'disable'
eventsMapping:
- from: 'Product Added'
to: 'AddToCart'
- from: 'Product Viewed'
to: 'ViewCategory'
- from: 'Product Seen'
to: 'PageVisit'
sendingUnHashedData: true
tagId: 'Techno@2020'
whitelistedEvents:
- eventName: ''
Enabled: true
WorkspaceID: '27O0bhB6p5ehfOWeeZlOSsSDTLg'
Transformations: []
IsProcessorEnabled: true
RevisionID: '2JgW8QPyFsDvodPYShZ29XH3sKB'
apiKey: '93AEyDLvfpbRxx12'
ID: 'june123'
batched: false
statusCode: 400
error: "Random is not mapped in UI. Make sure to map the event in UI or enable the 'send as custom event' setting"
error: 'Missing required value from "userIdOnly"'
statTags:
destType: 'JUNE'
errorCategory: 'dataValidation'
errorType: 'configuration'
destType: 'PINTEREST_TAG'
module: 'destination'
implementation: 'cdkV2'
errorType: 'instrumentation'
feature: 'router'
destinationId: '2JIqVoWNvSOHa9ppKOqSo4hPuc0'
workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg'
implementation: 'native'
module: 'destination'
destinationId: '2JIqVoWNvSOHa9ppKOqSoxxx'
Loading

0 comments on commit 5e22fa0

Please sign in to comment.