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

camel-rest - Code first should use actual values for property placeholders in dumped API spec

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.4.3, 4.7.0
    • 4.4.4, 4.8.0
    • camel-rest-openapi
    • None
    • Unknown

    Description

         <restContext id="rest-test-data-api" xmlns="http://camel.apache.org/schema/spring">
              <rest path="/test">
                  <securityDefinitions>
                      <oauth2 key="oauth2" flow="application" tokenUrl="{{oauth.token.url}}">
                          <scopes key="{{oauth.scope.service.self}}"
                                  value="{{oauth.scope.service.self}}"/>
                          <scopes key="{{oauth.scope.test.person.data}}"
                                  value="{{oauth.scope.test.person.data}}"/>
                      </oauth2>
                  </securityDefinitions>
                  <get path="/data">
                      <security key="oauth2" scopes="{{oauth.scope.test.person.data}}" />
                      <to uri="direct:personService"/>
                  </get>
              </rest>
          </restContext>
      

      But when access http://localhost:8080/restContext/api the OpenApi json doesn't present the resolved placeholders:

         "securitySchemes" : {
            "oauth2" : {
              "type" : "oauth2",
              "flows" : {
                "clientCredentials" : {
                  "tokenUrl" : "${oauth.token.url}",
                  "scopes" : {
                    "{{oauth.scope.service.self}}" : "{{oauth.scope.service.self}}",
                    "{{oauth.scope.test.person.data}}" : "{{oauth.scope.test.person.data}}"
                  }
                }
              }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              davsclaus Claus Ibsen
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: