historical/m0-applesillicon.git/xnu-qemu-arm64-5.1.0/tests/qapi-schema/flat-union-optional-discriminator.json
2024-01-16 11:20:27 -06:00

10 lines
329 B
JSON

# 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' } }