qemu/tests/qapi-schema/flat-union-optional-discriminator.json

11 lines
329 B
JSON
Raw Normal View History

# we require the discriminator to be non-optional
{ 'enum': 'Enum', 'data': [ 'one', 'two' ] }
{ 'struct': 'Base',
'data': { '*switch': 'Enum' } }
{ 'struct': 'Branch', 'data': { 'name': 'str' } }
{ 'union': 'MyUnion',
'base': 'Base',
'discriminator': 'switch',
'data': { 'one': 'Branch',
'two': 'Branch' } }