qemu-e2k/tests/qapi-schema/union-base-empty.json
Markus Armbruster 4e99f4b12c qapi: Drop simple unions
Simple unions predate flat unions.  Having both complicates the QAPI
schema language and the QAPI generator.  We haven't been using simple
unions in new code for a long time, because they are less flexible and
somewhat awkward on the wire.

The previous commits eliminated simple union from the tree.  Now drop
them from the QAPI schema language entirely, and update mentions of
"flat union" to just "union".

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210917143134.412106-22-armbru@redhat.com>
2021-09-27 08:23:25 +02:00

10 lines
228 B
JSON

# Union with empty base and therefore without discriminator
{ 'struct': 'Empty', 'data': { } }
{ 'union': 'TestUnion',
'base': 'Empty',
'discriminator': 'type',
'data': { 'value1': 'int',
'value2': 'str' } }