summaryrefslogblamecommitdiffstats
path: root/tests/qapi-schema/flat-union-inline.json
blob: a9b3ce3f0d14fb80efcbfe10ef470ea4993ecdac (plain) (tree)
1
2
3
4
5
6
7
8
9
                                         
                                                      

                                  
                   

                                                  
                 
                           
                                     
                                              
# we require branches to be a struct name
# TODO: should we allow anonymous inline branch types?
{ 'enum': 'TestEnum',
  'data': [ 'value1', 'value2' ] }
{ 'struct': 'Base',
  'data': { 'enum1': 'TestEnum', 'kind': 'str' } }
{ 'union': 'TestUnion',
  'base': 'Base',
  'discriminator': 'enum1',
  'data': { 'value1': { 'type': {} },
            'value2': { 'integer': 'int' } } }