I have a project where I use SpringDoc OpenAPI library to auto generate my docs. I have some endpoints like so
@Operation(tags = "Something")
@RequestMapping( . . . )
@PreAuthorize("isSuperadmin() || hasRole('MegaRole')")
public void doSomething() {
. . .
}
Is it possible for SpringDoc to automatically read the @PreAuthorize
statement so it can show somehow what's within it? That way users would see which permissions do they need to call the endpoints.