modelling polymorphism and/or composition in OpenApi

2018-05-11 Thread michal . laguna
Hi, We're working on a resource operation which might return different implementations of a given interface. Let's say it's an operation returning a Pet, which can be either a Dog, or a Cat. Additionally all my Pets have a common property, "noise". I wouldn't like to go into inheritance vs

modelling polymorphism and/or composition in OpenApi

2018-05-11 Thread michal . laguna
Hi, We're working on a resource operation which might return different implementations of a given interface. Let's say it's an operation returning a Pet, which can be either a Dog, or a Cat. Additionally all my Pets have a common property, "noise". I wouldn't like to go into inheritance vs c

modelling polymorphism and/or composition in OpenApi

2018-05-11 Thread michal . laguna
Hi, We're working on a resource operation which might return different implementations of a given interface. Let's say it's an operation returning a Pet, which can be either a Dog, or a Cat. Additionally all my Pets have a common property, "noise". I wouldn't like to go into inheritance vs c

Re: modelling polymorphism and/or composition in OpenApi

2018-05-17 Thread michal . laguna
Hi, I guess my previous question was a bit too long ;) Could I possibly just ask you to help me with the following two simple questions instead? 1. Is the following model with the a resource operation returning a Pet, which can be 'oneOf' Dog/Cat correct? I'm precisely asking if this is fine t