title: How to ask Swagger UI to add bearer token field for each endpoint globally?
body: <p>Because of the issue described <a href="https://stackoverflow.com/questions/70036953/springboot-2-6-0-spring-fox-3-failed-to-start-bean-documentationpluginsboot">here</a> I am migrating to Springdoc. And now <strong>in Swagger UI</strong> I don't have a field for bearer token for each endpoint but it is expected because those endpoints are secured.
  <a href="https://i.stack.imgur.com/D3Mpk.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/D3Mpk.jpg" alt="enter image description here" /></a></p>
  <p>I have the following configuration:</p>
  <pre class="lang-java prettyprint-override"><code>@Bean
  public OpenAPI myAPI() {
    return new OpenAPI()
        .components(new Components()
            .addSecuritySchemes(&quot;bearer-key&quot;,
                new SecurityScheme().type(SecurityScheme.Type.HTTP).scheme(&quot;bearer&quot;).bearerFormat(&quot;JWT&quot;)))
        .info(new Info()
            .title(&quot;MY API&quot;)
            .description(&quot;Documentation of API v.1.0&quot;)
            .version(&quot;1.0&quot;)
        ).addSecurityItem(
            new SecurityRequirement().addList(&quot;bearer-jwt&quot;, Arrays.asList(&quot;read&quot;, &quot;write&quot;)));
  }
  </code></pre>
  <p>I've found workaround - marking each invidual endpoint with:</p>
  <pre class="lang-java prettyprint-override"><code>@Operation(summary = &quot;some description&quot;, security = { @SecurityRequirement(name = &quot;bearer-key&quot;) })
  </code></pre>
  <p>But I don't like to do this repeated work.</p>
  <p>Is there a way to make it global for each rest endpont?</p>