• sam

    Hi Mike,

    I am trying to get 1.0.0 to work with swagger, which i end up with lot of NoClassDefFoundError errors.

    do you have your complete dropwizard hosted any where to look at ?

  • I do not have the full source in a public repository, sorry! Why swagger 1.0? Do you get those errors in the project, or in swagger?

  • Pawan Gupta

    I have followed the steps you have mentioned.. but swagger is not working on that port.. is there anything else we have to take care.

    • When the app starts, in the console log it will show the port that swagger is running on. Do you see that in the console?

      • Pawan Gupta

        So i have 2 ports one for my app (for rest api) and other i just configured: http://localhost:9080
        I can see app port:

        INFO o.e.j.s.ServerConnector – [ – ] – Started application@7499eac7{HTTP/1.1}{}

        but i dont see the newly configured port for swagger but i do see following end point when app starts:

        GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON)
        GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON)

        Do i have to start swagger-ui on different server and configure this url?

        • ok. I would think that one of these two links would work:


          You do not need another server for it, one of those should work.

          • Pawan Gupta

            Thanks Mike for prompt response. I can see gives me json with all apis[] but i want to see them in swagger-ui format.

          • Great! To make sure it is working you can visit http://petstore.swagger.io/ and then enter in to see the documentation UI.

            If you want to host swagger so others can view it for your API, you can download the docs UI package and then add it as static content that is hosted by your app. There is a small amount of configuration required also, so that it defaults to your api. (assuming you will have a hostname and not use in the future.)