Here in the documentation of Swagger it explains how to define discriminators when our schema is dependent on the value of a property. In my own project, I have a schema that is