question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Presentation of maps in static docs

See original GitHub issue

I 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:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
wbauerncommented, Oct 13, 2016

@dilipkrish Got it working with the latest version of Swagger2Markup. Thanks for pointing me in the right direction.

0reactions
RobWincommented, Oct 13, 2016

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get Started | Maps Static API - Google Developers
The Maps Static API returns an image (either GIF, PNG or JPEG) in response to an HTTP request via a URL. For each...
Read more >
Terms of use for static maps—ArcGIS Online Help
A static map includes screen captures, a printed or plotted map, a map used in a PDF file, a map used in a...
Read more >
Static and print maps | Help - Mapbox docs
Static maps are standalone images in PNG format that can be displayed on web and mobile devices without the aid of a mapping...
Read more >
Get a Static Map - Bing Maps | Microsoft Learn
Demonstrates, using various templates, how to get and display routes on a static map.
Read more >
Static Digital Maps / Minnesota IT Services
Static digital maps are standalone graphics, such as a JPGs or PDF files. They are typically non-interactive and serve as useful guides with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found