title: Default response class in springdoc
body: <p>I am trying to add a default error model to all endpoints in my API, for some error codes.</p>
  
  <p>I found a partial solution by reading the following issues:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/60302708/springfox-springdoc-how-to-expose-additional-models">Springfox -&gt; Springdoc: How to expose additional models</a></li>
  <li><a href="https://github.com/springdoc/springdoc-openapi/issues/381" rel="noreferrer">https://github.com/springdoc/springdoc-openapi/issues/381</a></li>
  </ul>
  
  <p>This is the bean I am creating for that customisation:</p>
  
  <pre><code>    @Bean
      public OpenApiCustomiser customOpenApiCustomiser() {
          return openApi -&gt; {
              openApi.getPaths().values().forEach(pathItem -&gt; pathItem.readOperations().forEach(operation -&gt; {
  
                  Schema sharedErrorSchema = ModelConverters.getInstance()
                          .read(Error.class)
                          .getOrDefault("Error", new Schema());
  
                  MediaType sharedMediaType = new MediaType().schema(sharedErrorSchema);
                  Content sharedContent = new Content()
                          .addMediaType(APPLICATION_JSON_VALUE, sharedMediaType);
  
                  ApiResponses apiResponses = operation.getResponses();
  
                  ApiResponse response = new ApiResponse()
                          .description("Unhandled server error")
                          .content(sharedContent);
                  apiResponses.addApiResponse("500", response);
              }));
          };
      }
  </code></pre>
  
  <p>And my Error class looks something like:</p>
  
  <pre><code>public class Error {
      private String message;
      private List&lt;ErrorItem&gt; errorItems;
  }
  </code></pre>
  
  <p>The problem is that when I open one of the endpoints definition in swagger-ui, I am getting the following error:</p>
  
  <p><code>Could not resolve reference: Could not resolve pointer: /components/schemas/ErrorItem does not exist in document</code></p>
  
  <p>How can I define the schema for ErrorItem, making it available for swagger-ui?</p>
  
  <p>I am using:</p>
  
  <ul>
  <li>Spring Boot => 2.2.4.Release</li>
  <li>springdoc-openapi-ui => 1.3.0</li>
  <li>springdoc-openapi-security => 1.3.0</li>
  </ul>