RapiDoc icon indicating copy to clipboard operation
RapiDoc copied to clipboard

XML : missing namespace + incorrect name for array items

Open bligny opened this issue 4 years ago • 5 comments

Given the following (Swagger v2) specs:

responses:

   HeadpointPortfolio:        
    schema:
      type: array     
      xml:
        name: headpoints
        namespace: 'http://erpgis.haulogy.net/api/v1/crm'
        wrapped: true
      items:
        $ref: '#/definitions/HpPortfolioEntry'


definitions:

   HpPortfolioEntry:    
    type: object
    xml:
      namespace: 'http://erpgis.haulogy.net/api/v1/crm'
      name: headpoint          

The proposed xml response is: image

having two issues:

  • xml namespaces is not rendered (red arrow)
  • entries of array do not use the provided xml element name (green arrow)

Here is the output of SwaggerUI: image

bligny avatar Apr 03 '20 15:04 bligny

Thanks for the detailed use case and screenshot !!! Our schema to XML converter is pretty rudimentary, we just started providing this feature from 7.5.0, will be improving it soon

mrin9 avatar Apr 03 '20 17:04 mrin9

You are welcome. We have a bunch of Api's supporting both json and xml, that I could easily use to thoughtfully test next releases of XML converter.

Once your XML renderer will be as robust as the json one, I will convince my team to switch from swagger-to-markup and SwaggerUI to RapiDoc & RapiPdf and :-)

bligny avatar Apr 03 '20 19:04 bligny

@mrin9 any updates regarding this issue?

mohannad-musleh avatar May 19 '21 05:05 mohannad-musleh

@mrin9 has this been fixed or something that is being worked upon? Thanks!

Layap avatar Feb 07 '22 09:02 Layap

I changed from swagger to rapidoc. I'am very satisfied with seemless integration into our backend. But is there any progress with xml rendering? or an entry point to do something myself?

lothargrieb avatar Jun 20 '22 16:06 lothargrieb

for test case checkout - https://rapidocweb.com/examples/xml.html

for using and testing on your end pick rapidoc-min.js from dist folder in this repo

mrin9 avatar Sep 19 '22 03:09 mrin9