Closed brettkroeder closed 4 years ago
Can you post a small reproducible RAML snippet @brettkroeder, pls. I will test, confirm the issue using that, and let the team know.
Here is the Portal link
Thanks. I identified the issue already. Currently the console does not really convert the YAML example into both JSON and XML. That's obviously an issue, but the question is how much you support in here. Examples are easy, speaking about converting schemas is different. For example, what do you expect the console does in the following scenario:
#%RAML 1.0
title: Customer API
version: 1.0
mediaType: [ application/xml, application/json ]
/customers:
/all:
get:
responses:
200:
body:
type: |
{
... // any JSON schema
}
example: |
{
"name": "Brett"
}
Do you expect any client, in this case the console, to show you XML and XSD as well when you switch between the media types?
I would not expect it to cover explicit schemas and examples. But I do expect it to switch when defined with RAML DataTypes and NamedExamples.
Just like it does when I Try It
Agree. I put that as an enhancement request. Thanks Brett.
Summary:
Inside the API Console, I should be able to switch between XML and JSON, and see the examples that has been defined in YAML in their respective serialization format.
API Console version 3 is no longer supported. We are at version 6 right now. Please, upgrade your version of the console to have latest updates.
I changed the mediaType but the example did NOT change.