Hi You are welcome to create a JIRA about this improvement
On Tue, May 11, 2021 at 5:50 PM Shankar Ramamoorthy <sramamoor...@guidewire.com> wrote: > > Would like to add the ability to specify security requirement(s) for the > entire API into the Camel REST DSL. > > In the Camel REST DSL one can specify security requirements per > endpoint. But there isn't a way to specify security requirement(s) > applicable to all endpoints. In the OpenAPI 3 schema this corresponds to > a security section at the root level. > > Didn't find any Jira relating to this. Should I create one? > > Perhaps by just using the existing > > RestDefinition.security(String name [, String scopes]) > > but allow it to be called without a verb, in which case it would apply > to the entire API. In generated OpenAPI 3 JSON schema this would produce > a root level node such as: > > "security": [ {"api_key": []}] or "security": [{"oauth2_auth": [ > "read", "write" ]}] > > Currently if you do, for example, rest().security(scheme), you get an > IllegalArgumentException that one "Must add verb first, ..." > > Regards, > > Shankar > > -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2