Referenced example values become double quoted strings
Swagger2Markup version:
1.3.1 (via the 1.3.3 swagger2markup maven plugin)
Problem description:
Example values for references of references have the correct value, but they always become double quoted strings regardless of their type.
So, given the following yaml:
---
swagger: '2.0'
info:
version: 0.0.0
title: Simple API
tags:
- name: sample
paths:
/:
get:
tags:
- sample
responses:
200:
description: OK
schema:
$ref: '#/definitions/Response'
definitions:
Response:
type: object
properties:
id1:
type: integer
example: 1
id2:
$ref: '#/definitions/Id2'
string1:
type: string
example: string1
string2:
$ref: '#/definitions/String2'
Id2:
type: integer
example: 2
String2:
type: string
example: string2
The resulting ascii doc is:
...
===== Example HTTP response
====== Response 200
[source,json]
----
{
"id1" : 1,
"id2" : "2",
"string1" : "string1",
"string2" : "\"string2\""
}
----
instead of the expected:
...
===== Example HTTP response
====== Response 200
[source,json]
----
{
"id1" : 1,
"id2" : 2,
"string1" : "string1",
"string2" : "string2"
}
----
Thx for opening an issue. Atm I don't have much time to maintain the project. But I would be happy for review a PR and merge it.
Issue #448 in the swagger-parser is the root cause and will be fixed with pull request #449 (tested on a local branch).
Awesome. Thx for the information
The swagger parser just released version 1.0.35. If a new release of swagger2markup is built with this version, then this problem will be resolved. In addition, if the latest changes (specifically fixes for #264 and #266) are included, then this new release gives me a clean pipeline to produce documents from a swagger spec.
Now that the pull request has been incorporated, what will cause a new official release of swagger2markup? Eventually, I'd like that as well as a new release of the swagger2markup-maven-plugin that is built with this new release.