Skip to content

@AuthenticationPrincipal is not ignored and overwrites @RequestBody parameters #198

@kaibra

Description

@kaibra

Hey,

I saw, that in case you inject the Principal by using @AuthenticationPrincipal into your controller it would be treated as RequestBody and overwrite other valid RequestBody parameters.

See: https://github.com/kaibra/springdoc-openapi/commit/f2763a0968542526b215a4ce854bb90d007933c7 , where I added a app61_actual.json file which contains the actual output of the endpoint.

Looks like this could be fixed in https://github.com/springdoc/springdoc-openapi/blob/master/springdoc-openapi-webmvc-core/src/main/java/org/springdoc/core/RequestBuilder.java#L24 ?!

Regards,

Kai

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions