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