You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tested also with Firefox 82.0.3, and Chromium 86.0.4240.183.
Content & configuration
Example Swagger/OpenAPI definition:
openapi: 3.0.0info:
description: Wrong attribute rendering in an example of a XML responseversion: "1.0.0"title: XML Testpaths:
/about:
get:
summary: Aboutdescription: Retrieves generic informationresponses:
'200':
description: Generic information.content:
application/json:
schema:
$ref: '#/components/schemas/api_response'example:
code: ok_jsonsummary: Ok JSONapplication/xml; charset=utf-8:
schema:
$ref: '#/components/schemas/api_response'example:
code: ok_xmlsummary: Ok XMLcomponents:
schemas:
api_response:
description: OK. The request has succeeded.properties:
code:
type: stringxml:
attribute: truesummary:
type: stringxml:
name: statusexample:
code: ok_defaultsummary: Ok default
Describe the bug you're encountering
Switching the "Media type" to "application/xml; charset=utf8" results in this xml:
The text was updated successfully, but these errors were encountered:
eduardoj
changed the title
Wrong attributte rendering, in an example of a XML response
Wrong attribute rendering, in an example of a XML response
Nov 13, 2020
Q&A
Tested also with Firefox 82.0.3, and Chromium 86.0.4240.183.
Content & configuration
Example Swagger/OpenAPI definition:
Describe the bug you're encountering
Switching the "Media type" to "application/xml; charset=utf8" results in this xml:
The
code
attribute should have the valueok_xml
.To reproduce...
Steps to reproduce the behavior:
code
attribute.Expected behavior
The
code
attribute should have the valueok_xml
.Additional context or thoughts
This does not happen in SwaggerHub. Only in my local Swagger-UI instance, created from the
dist
assets.Link to a working example, in SwaggerHub: https://app.swaggerhub.com/apis/eduardoj/xmlExampleWrongAttribute/1.0.0
The text was updated successfully, but these errors were encountered: