Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-816

[Swagger-WebApp] Ability to configure and default the discovery URL

    Details

    • Type: Enhancement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 2016.10.0
    • Fix Version/s: 2018.3.3
    • Component/s: None
    • Labels:
      None

      Description

      Currently, there doesn't seem to be any way to configure the swagger-webapp fraction.

      Here is what I have,

      • Gradle based multi module project - model (Jar) & web (War)
      • In the web project, I am exposing the REST services via a subclass of Application. All services are exposed under the context-path of "/api".
      • In the web project, I have included the "swagger-webapp" fraction. This allows me to access the Swagger UI via the context path - "/swagger-ui".

      Things that I would like to change / configure,

      • I would like to change the context path of swagger-ui to "/api-docs".
      • When accessing the Swagger UI, it would be nice to load the locally available "swagger.json" file (if available) instead of having the user enter it on the browser.

      What am I trying to achieve?

      I am putting together a sample project which developers can include in their codebase for validating and verifying their REST APIs. This project template will expose the APIs via the context path of "/api" and provide documentation via the context path of "/api-docs".

      Hence the need to customize the context path under which swagger-webapp is exposed as well the ability to change the default discovery URL.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  johnAls John Alstrom
                  Reporter:
                  harsha.ramesh Harsha Ramesh
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: