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

                                  
                       
                          

                                     
# flat unions require a base
# TODO: simple unions should be able to use an enum discriminator
{ 'struct': 'TestTypeA',
  'data': { 'string': 'str' } }
{ 'struct': 'TestTypeB',
  'data': { 'integer': 'int' } }
{ 'enum': 'Enum',
  'data': [ 'value1', 'value2' ] }
{ 'union': 'TestUnion',
  'discriminator': 'Enum',
  'data': { 'value1': 'TestTypeA',
            'value2': 'TestTypeB' } }