Marc Knaup
06/19/2019, 3:15 PMsandwwraith
06/19/2019, 3:32 PMMarc Knaup
06/19/2019, 3:33 PMMarc Knaup
06/19/2019, 3:35 PMtype in one case, groupType in another case, shape in another case etc.sandwwraith
06/19/2019, 3:38 PMMarc Knaup
06/19/2019, 3:39 PMtype for GeoJSON, @type for JSON-LD. Different properties for discrimination. Can all be part of the same response.
What makes a good name for a discriminator should depend on the thing which the type represents, not some generic property name.Marc Knaup
06/19/2019, 3:41 PMsandwwraith
06/19/2019, 3:42 PMMarc Knaup
06/19/2019, 3:44 PMAnimal for example someone could use species instead of type because they denote different things. yet the whole API may be bound to use type for discrimination. The API consumer would be confused.
IMO it really depends on each case what makes a sensible name for a discriminator.Marc Knaup
06/19/2019, 3:44 PMtype happens to be a good default but it's also a very "technical" point of view.vikas.k
01/27/2020, 5:03 PM