Description
Issue
I always feel uneasy about *Of being assumed to be acting to define model properties not found in properties and I see other potential future options 'select'/'if' looking the same way. I feel it inhibits the ability to accurately generate a UI without needing to process validation or model keywords as if they are a ui-schema definition.
I have seen implementations provide a plus sign and then display part of the form that is in the oneOf list and I've seen all sorts of other combinations where implementations have tried to define what option to display in a drop down to choose a form fragment to display. I've seen discussion around special types of keys for referencing the *Of elements from a UI schema.
I don't believe we should create a blueprint and leave out important structural details and ask the builder to decide what to do.
Proposal
*Of
I'd like to see all properties defined in *Of, or any other keyword that can bypass properties, be required in properties and relatively referenced instead if the user intends to have a form generator display the fields at all. In addition I would like to see a clear definition of how any such item is to be processed to display so that implementations can provide a level of consistency, this is not specifically about the look, but instead the elemental level, at least, of what is provided (a select could be tabs or radio buttons for example).
Essentially something along the lines of: if the fields are in properties and there is a title value within all the oneOf's then make them selectable sub schema, otherwise, don't and use them only for validation instead.
Obviously to be refined, but I wanted to give an idea about the direction of what I am suggesting.
Keys
To be clear, I am not suggesting you MUST have everything in properties, if the schema is purely for **validation"", you do not need to, however if you want the fields rendered at all, then they should be.
For Model and UI purposes I believe it makes more sense for them to be required in properties as it makes it easier to reference them as keys internally by any implementation. I believe it is also required for clear UI schema definitions.
Definition
I would like to see any new proposals require a definition and discussion on how it should be rendered in the UI, both with, and importantly without, UI Schema. As part of UI schema I think it should define an option to just render the schema in the way json-schema-form has "*" and "..." key options that should render the fields based exclusively on their schema definition. As such the UI schema specification will need to define how all elements should be rendered both with and without additional information provided..
Feedback
I would like to hear perspectives on this for consideration. I know @awwright has expressed a desire to always know how the schema should render and @Relequestual @epoberezkin @handrews may have input on this too, but if anyone knows people related to implementations please tag them in.
relative of: #67