Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-9425

base.path, host, and schemes are all ignored for generating the swagger definitions

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 2.16.1
    • Fix Version/s: None
    • Component/s: camel-swagger
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      This affects camel-swagger-java
      How do we add that component to the list?

      For example, i am using camel-servlet to serve APIs at path "foo"...

      i then have rest().get("/hello")......

      for the restConfiguration() I have

              restConfiguration().component("servlet").bindingMode(RestBindingMode.json)
                      .apiContextPath("/api-doc")
                      .apiProperty("api.title", "User API")
                      .apiProperty("api.version", "1.2.3")
                      .apiProperty("api.description", "REST API for controlling the jobs")
                      .apiProperty("cors", "true")
                      .apiProperty("base.path", "/camel")
                      .apiProperty("schemas", "http")
                      .apiProperty("host", "postamac.local")
      

      but when I hit /came/api-docs, the rest endpoints all omit the "/camel" base context path.

      what's the expected behavior here? I assumed that the schemes+host+base.path would allow me to override the base path. is this not the right assumption?

      BTW... the prop name is "schemas" when it should be "schemes" ... we should change this to as expected, how do we do that in terms of backward compatibility? i can open another jira for that.

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              ceposta Christian Posta
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: