cancel
Showing results for 
Search instead for 
Did you mean: 

Documentation Export with inherited types is incorrect

breaux
Contributor

Documentation Export with inherited types is incorrect

I have an openapi: 3.0.0 API where I've used type inheritance for some requests & responses, and when I view those in the SwaggerHub editor or viewer, they look as I want/expect: all the fields collapsed into a flat object:

image.png

 

But when I export the file to HTML, I instead get a very confusing view of all the nested "all of" elements.

image.png

How can I get the exported documentation to look like the online documentation in this regard?

2 REPLIES 2
abonstrom
Staff

Re: Documentation Export with inherited types is incorrect

Hi @breaux ,

 

The reason it looks different is because the first picture is an Open API document being rendered using Swagger UI (within SwaggerHub), and the second picture is an HTML file created by SwaggerHub. 

 

To view your API doc the same way you do in SwaggerHub, you'll want to download the YAML file from SwaggerHub, and use SwaggerUI to render your document. 

https://swagger.io/tools/swagger-ui/

 

Hope this helps,

Alex

breaux
Contributor

Re: Documentation Export with inherited types is incorrect

So I can't export HTML and get a flat display of the types? That would make me quit using hierarchical types. I don't want viewers of my HTML exports to have to be exposed to that confusing syntax 😞

 

(Just to be clear, I'm not talking about the pretty formatting/display, but about the exposure of the internal type hierarchy with each method.)

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors