Presentation of maps in static docs
See original GitHub issueI have a question about how maps are displayed in the static docs generated from SpringFox. I’m currently using version 2.6.0. I have a class that contains a List<Item> and a Map<String,Item>. The list is presented as I would expect in the static docs with a schema of Item array (with the Item being a link to the Item spec in the doc). The map field itemMap however just shows a schema type of object with no reference to the Item spec at all. Is this expected behavior? I understand that there is no map type in the Swagger spec but I was hoping it would at least keep the relationship to the Item type which is correctly generated in the additionalProperties field of the spec.
The generated Swagger Spec from springfox contains:
"Memo" : {
"itemMap" : {
"additionalProperties" : {
"$ref" : "#/definitions/Item"
},
"type" : "object"
},
"itemList" : {
"items" : {
"$ref" : "#/definitions/Item"
},
"type" : "array"
}
},
"type" : "object"
},
Thanks for the help!
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
@dilipkrish Got it working with the latest version of Swagger2Markup. Thanks for pointing me in the right direction.
If you have any questions, then feel free to join our Swagger2Markup Gitter channel . If you like Swagger2markup and Springfox, we would love to get your GitHub Stars.