title: Swagger - Controller not include in OpenApi-Documentation
body: <p>I have a <code>JAX-RS</code> web service which I want to document with <code>Swagger 2.1</code>.<br/></p>
  <p>The config is build in my Servlet:</p>
  <pre><code>public class FooWebservice extends HttpServlet {
      @Override
      public void init(ServletConfig config) throws ServletException {
          OpenAPI oas = new OpenAPI();
          Info info = new Info()
              .title(&quot;Foo-Webservice&quot;)
              .version(&quot;1.0.0&quot;);
  
          oas.info(info);
  
          SwaggerConfiguration oasConfig = new SwaggerConfiguration()
              .prettyPrint(true)
              .openAPI(oas)
              .resourcePackages(Stream.of(&quot;de.kembytes.foo.webservice.controller&quot;).collect(Collectors.toSet()));
  
          try {
              new JaxrsOpenApiContextBuilder()
                  .servletConfig(config)
                  .openApiConfiguration(oasConfig)
                  .buildContext(true);
          } catch (OpenApiConfigurationException e) {
              throw new ServletException(e.getMessage(), e);
          }
      }
  }
  </code></pre>
  <p>In addition I have a controller that defines the operation (in package <code>de.kembytes.foo.webservice.controller</code>):</p>
  <pre><code>@Path(&quot;/foo&quot;)
  @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
  @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
  @Tag(name = &quot;Foo&quot;)
  public class FooController {
      @POST
      @Path(&quot;/calculate&quot;)
      @Operation(summary = &quot;returns bar&quot;,
          responses = {
              @ApiResponse(responseCode = &quot;200&quot;, description = &quot;bar&quot;, content = {
                  @Content(mediaType = MediaType.APPLICATION_XML, schema = @Schema(implementation = Bar.class)),
                  @Content(mediaType = MediaType.APPLICATION_JSON, schema = @Schema(implementation = Bar.class)) }) })
      public Bar calculate(@RequestBody(required = true, content = @Content(schema = @Schema(implementation = FooInput.class))) FooInput input) throws Exception  {
          Bar bar = new Bar();
          bar.setValue1(...);
          bar.setValue2(...);
          bar.setValue3(...);
  
          return bar;
      }
  }
  </code></pre>
  <p>When i start my Application and get the OpenApi-Documentation the <code>FooController</code> is not included. It looks like this:</p>
  <pre><code>{
    &quot;openapi&quot; : &quot;3.0.1&quot;,
    &quot;info&quot; : {
      &quot;title&quot; : &quot;Foo-Webservice&quot;,
      &quot;version&quot; : &quot;1.0.0&quot;
    }
  }
  </code></pre>
  <p>Why is it that the config was not loaded in <code>FooController</code> although it is in the specified resource package?</p>