elements icon indicating copy to clipboard operation
elements copied to clipboard

Confusing discriminator behaviour

Open hotrush opened this issue 1 year ago • 0 comments

Context

Would be good to get much more clear discriminator behaviour

Current Behavior

This issue https://github.com/stoplightio/elements/issues/2190 says that schema name (or title, doesn't matter) used as options values in the dropdown, but it's confusing because:

  • user doesn't know what value for what field you need to send (discriminator field is not even highlighted or so)
  • what schema from oneOf list relates to what discriminator value
  • schema name/title is not always self-explanatory, it's not named like SchemaWhenField1HasValueOfFoo

Expected Behavior

  • dropdown should be located at the discriminator field level
  • dropdown values should contain keys from discriminator mapping (actual field values) (if provided of course)

hotrush avatar Nov 26 '24 16:11 hotrush