You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2024/09/07 06:13:00 UTC

[jira] [Resolved] (CAMEL-21164) camel-rest - Code first should use actual values for property placeholders in dumped API spec

     [ https://issues.apache.org/jira/browse/CAMEL-21164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-21164.
---------------------------------
    Resolution: Fixed

> camel-rest - Code first should use actual values for property placeholders in dumped API spec
> ---------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-21164
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21164
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-rest-openapi
>    Affects Versions: 4.4.3, 4.7.0
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.4.4, 4.8.0
>
>
> {code}
>    <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>
> {code}
> But when access http://localhost:8080/restContext/api the OpenApi json doesn't present the resolved placeholders:
> {code}
>    "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}}"
>             }
>           }
>         }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)