[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Swagger securityDefinition

Hi guys

I’ve deployed Redhat SSO/ Key cloak and am successfully able to use it as a bearer-only client to verify tokens before executing webservices as defined by my restConfiguration

What I would like to do next is extend the swagger doc that gets generated to include securityDefinitions for documentation purposes like this:
            "write:pets":"modify pets in your account",
            "read:pets":"read your pets"

Example from http://petstore.swagger.io/

I see I am able to give the restConfig it’s own apiComponent but do not see how to get something like:
        Swagger swagger = new Swagger().info(info);
                new OAuth2Definition()
                        .scope("read:pets", "read your pets")
                        .scope("write:pets", "modify pets in your account"));
Into the component 

Has anyone done something like this before? The only clues I have found online is that someone suggested extending camel-swagger-java to achieve this. A kick in the direction of how to do that will also be welcome

Holding thumbs!


Sent from Mail for Windows 10