How to create spec for Object with Sub-Objects with variable names? See example request body inside
Hi there,
to clarify, here is the kind of Request Body I would like to spec out:
{
"event" : "eventname",
"payload" : {
"Customer" : {
"Mail" : "user@domain.invalid",
"Firstname" : "Lorem ipsum",
"Lastname" : "Lorem ipsum",
},
"Shop" : {
"ShopUrl" : "Lorem ipsum",
}
}
}
The problem ist, the objects in the "payload" object should be variable - so not just necessarily "Customer" and "Shop", but variable object names and a variable number of objects.
I've tried to implement an API spec for this for the last 3 hours or so, but I'm getting nowhere. I'm wondering if this is even possible that way?
Any help would be greatly appreciated.
"payload" is a string-to-object dictionary. Dictionaries are defined as follows:
payload: type: object additionalProperties: type: object