Skip to content

Instantly share code, notes, and snippets.

@MichaelDrogalis
Created November 13, 2023 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MichaelDrogalis/ed73e2c394de5a126320d80d8b18b339 to your computer and use it in GitHub Desktop.
Save MichaelDrogalis/ed73e2c394de5a126320d80d8b18b339 to your computer and use it in GitHub Desktop.
{
"generators": [
{
"topic": "pushEvents",
"value": {
"commits": {
"_gen": "repeatedly",
"n": { "_gen": "uniformDistribution", "bounds": [1, 10] },
"target": {
"id": {"_gen": "gitSha"},
"tree_id": {"_gen": "gitSha"},
"distinct": true,
"message": { "_gen": "string", "expr": "#{Company.catchPhrase} #{Company.buzzWord}" },
"timestamp": {
"_gen": "formatDateTime",
"ms": { "_gen": "now" }
},
"author": {
"_gen": "weightedOneOf",
"choices": [
{
"weight": 9,
"value": {
"_gen": "lookup",
"topic": "pushEvents",
"path": [ "value", "commits", 0, "author" ]
}
},
{
"weight": 1, "value": {
"name": { "_gen": "string", "expr": "#{Name.fullName}" },
"email": { "_gen": "string", "expr": "#{Internet.emailAddress}" }
}
}
]
} ,
"committer": {
"name": { "_gen": "string", "expr": "#{Name.fullName}" },
"email": { "_gen": "string", "expr": "#{Internet.emailAddress}" },
"username": { "_gen": "string", "expr": "#{Name.username}" }
},
"added": {
"_gen": "repeatedly",
"n": { "_gen": "uniformDistribution", "bounds": [1, 3] },
"target": { "_gen": "string", "expr": "#{File.fileName}" }
},
"removed": {
"_gen": "repeatedly",
"n": { "_gen": "uniformDistribution", "bounds": [0, 2] },
"target": { "_gen": "string", "expr": "#{File.fileName}" }
},
"modified": {
"_gen": "repeatedly",
"n": { "_gen": "uniformDistribution", "bounds": [0, 5] },
"target": { "_gen": "string", "expr": "#{File.fileName}" }
}
}
}
}
}
],
"connections": {
"decodable-test": {
"kind": "webhook",
"dataShape": "kafka",
"bodyFormat": "decodable",
"httpConfigs": {
"url": "https://michael-drogalis.api.decodable.co/v1alpha2/connections/c63ac765/events",
"headers": {
"Authorization": "Bearer XXX"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment