Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The scopes from security declaration of an operation are ignored #12429

Open
msevcenko opened this issue Jul 22, 2024 Discussed in #12428 · 0 comments
Open

The scopes from security declaration of an operation are ignored #12429

msevcenko opened this issue Jul 22, 2024 Discussed in #12428 · 0 comments

Comments

@msevcenko
Copy link

msevcenko commented Jul 22, 2024

Discussed in #12428

In the following settings of an operation:

      security:
        - petstore_auth:
            - write:pets
            - read:pets

it seems that only scheme name is retrieved, and the actual list of scopes is ignored, i.e. all scopes are used for operation. The following code is then generated

    @GET
    @Path("/findByStatus")
    @Produces({ "application/json", "application/xml" })
    @Operation(summary = "Finds Pets by status", description = "Multiple status values can be provided with comma separated strings", security = {
        @SecurityRequirement(name = "petstore_auth", scopes = {
            "write:pets",
"read:pets"        })    }, tags={ "pet" }) 

even if the list of scopes is reduced e.g. to

      security:
        - petstore_auth:
            - read:pets

Tested with swagger editor example and downloading code as jaxrs-jersey server code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant