Open
Description
We're currently using OpenAPI 3.0.
3.1 adds in arrays of types. This is useful as a component config item may want to accept multiple types, eg. the Text component could accept anything and convert it to a string. We should also aim to stay up-to-date with OpenAPI.
This needs some thinking as to how we will handle it both coming from the API, in the component definitions, and in the builder client.
- If an API returns
['string', 'number']
and the component expects'string'
is that valid? - If an API returns
'string'
and the component expects['string', 'number']
is that valid? - If a component config item has multiple types in a static mode, what do we render? Is there a priority list?
array/object
,string
,number
,boolean
? - If a component config item has multiple types including
array
orobject
should we still supportform
mode?