Hi Tom.
The non-pretty printed JSON is a known issue – I just can’t find the ticket
right now.
The case of it actually being escaped is new to me, would appreciate if you can
open a ticket on that.
From: on behalf of Tom Johnson
Reply-To: "swagger-swaggersocket@googlegroups.com"
Date: Friday, 16 June 2017 at 13:42
To: Swagger
Subject: JSON automatically minified in responses > examples object
When I add an examples property in the responses object, the example is
automatically minified.
Here's an example. Go here:
http://idratherassets.com/restapicourse/swaggercomplete/. Expand Weather Data,
then look for the "400" Response (test operation). (This comes after the 200
example.) That JSON is minified. But if you look at the YAML file
(http://idratherassets.com/restapicourse/swaggercomplete/swagger_weather.yml),
search for "400:", you'll see that the JSON is not minified there.
Also, if I change it to the formatting to this:
400:
description: "Test operation"
examples:
application/json: >
{
"query": {
or use | or |- instead of >, then the JSON also gets escaped (in addition to
being minified).
Is this a known bug?
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.