Uploaded image for project: 'Red Hat build of Apache Camel for Spring Boot'
  1. Red Hat build of Apache Camel for Spring Boot
  2. CSB-5382

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • CSB-4.8
    • CSB-4.4
    • Camel
    • False
    • Hide

      None

      Show
      None
    • False
    • Very Likely
    • 0

      The SecurityDefinitions are defined like this:

         <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}}"
                  }
                }
              }
      

              fmariani@redhat.com Federico Mariani
              rhn-support-adongre Avinash Dongre
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: