List<Map<String, String>> in models not rendered correctly
See original GitHub issueHi,
I have the following issue : one of my models has an attribute List<Map<String,String>>
.
It is rendered as
items: {
$ref: "#/definitions/Map«string,string»"
}
in the swagger.json. The problem is that not only it is not valid, but it doesn’t help at all to describe the attribute.
As seen in swagger-editor online, the problem is Definition could not be resolved: #/definitions/Map«string,string»
I have looked at alternateTypeRules
and directModelSubstitute
when creating the docket, but I haven’t found how to solve this. I’ve also tried datatype
attribute for @ApiModelProperty.
Moreover, it would be perfect if I could describe it more precisely, such as
[{"id":"aeiuo"}]
Is there any way first to fix the json ? Also, is there anything I could do to describe more precisely this attribute ? I’ve already put this in the description, so this part of my issue is less important.
Thanks
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (3 by maintainers)
Is this bug fixed? If yes, which version is it available?
Is this bug fixed? I have a
private Map<String, Map<String, List<Thumbnail>>> thumbnails;
which is causing the following json to be generated"MapOfstringAndListOfThumbnail": { "type": "object", "title": "MapOfstringAndListOfThumbnail", "additionalProperties": { "$ref": "#/definitions/List" } }
and the $ref: “#definitions/List” is not present in the documentation. This is causing Semantic error at definitions.MapOfstringAndListOfThumbnail.additionalProperties.$ref $refs must reference a valid location in the document