Forum Discussion

anilkd's avatar
Occasional Visitor
2 years ago

Inheritance with discriminator outside object

My example:
I would like to design polymorphic object for data base on evenType. Here the discriminator is sitting outside data object. Is this a feasible thing in OpenAPI ?

as per the docs discriminator should be part of the object




    "id": "2d1781af-3a4c-4d7c-bd0c-e34b19da4e66",
    "topic": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "subject": "",
    "data": {
      "validationCode": "512d38b6-c7b8-40c8-89fe-f46f9e9622b6",
      "validationUrl": ""
    "eventType": "Microsoft.EventGrid.SubscriptionValidationEvent",
    "eventTime": "2022-10-28T04:23:35.1981776Z",
    "metadataVersion": "1",
    "dataVersion": "1"





No RepliesBe the first to reply