Forum Discussion

bbuzzard's avatar
bbuzzard
Occasional Contributor
5 years ago

What's the correct way to define an XML Collection containing an XML Element?

I'm using Swagger2.0 and I'm trying to define the following:

 

<root>

  <LREFERENCES>

    <LREFERENCE QUAL="A">

      <VALUE>100</VALUE>

    </LREFERENCE>

  </LREFERENCES>

</root>

 

I tried this:

...

   LREFERENCES:

     type: array

     items:

       type: object

       properties:

         LREFENCE:

           type: object

           properties:

             QUAL:

               type: string

               xml:

                 attribute: true

              VALUE:

                 type: string

 

But during testing the inner LSERVICE is not instantiated.  What am I doing wrong?

No RepliesBe the first to reply