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
OS: [e.g. macOS] Windows 10 Pro
Browser: [e.g. chrome, safari] chrome
Version: [e.g. 22] Version 85.0.4183.102 (Official Build) (64-bit)
Method of installation: [e.g. npm, dist assets] raw code
Swagger-UI version: [e.g. 3.10.0] master
Swagger/OpenAPI version: [e.g. Swagger 2.0, OpenAPI 3.0] 3.0.1
Content & configuration
Example Swagger/OpenAPI definition:
openapi: 3.0.1info:
title: Example Swaggerversion: '1.0'servers:
- url: /api/v1paths:
/xmlTest:
get:
summary: subscribes to a siri vm streamoperationId: registerSubscriptionparameters: []responses:
'200':
description: Simple examplecontent:
application/xml:
schema:
type: objectxml:
name: rootproperties:
x:
type: stringexample:
x: what the fexamples:
x2:
summary: "xml not rendered via 'examples' keyword"value:
x: should be xml
Describe the bug you're encountering
When providing examples via examples or example keyword for responses it will not be rendered according to media-type.
To reproduce...
Open yaml at editor and try to view xml response sample. You can delete the examples part and it will render it in xml.
Expected behavior
Examples provided via examples definition should be rendered respecting the content-type.
Screenshots
With examples:
Without examples, ok:
Additional context or thoughts
The text was updated successfully, but these errors were encountered:
mathis-m
changed the title
'Examples' keyword definitions can not be rendered as xml
Response examples do not respect media-type
Oct 2, 2020
Q&A (please complete the following information)
OS: [e.g. macOS] Windows 10 Pro
Browser: [e.g. chrome, safari] chrome
Version: [e.g. 22] Version 85.0.4183.102 (Official Build) (64-bit)
Method of installation: [e.g. npm, dist assets] raw code
Swagger-UI version: [e.g. 3.10.0] master
Swagger/OpenAPI version: [e.g. Swagger 2.0, OpenAPI 3.0] 3.0.1
Content & configuration
Example Swagger/OpenAPI definition:
Describe the bug you're encountering
When providing examples via
examples
orexample
keyword for responses it will not be rendered according to media-type.To reproduce...
Open yaml at editor and try to view xml response sample. You can delete the
examples
part and it will render it in xml.Expected behavior
Examples provided via
examples
definition should be rendered respecting the content-type.Screenshots
With examples:
Without examples, ok:
Additional context or thoughts
The text was updated successfully, but these errors were encountered: