title: OpenApi Codegen "Failed to get the schema name:"
body: <p>i use OpenAPI Generator to generate client on based my swagger.yaml
  i have this part of code:</p>
  
  <pre><code>...
      responses:
          '400':
             $ref: "#/errors/400"
  ...
  errors:
    '400':
      description: invalid request
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ErrResp"
  
  ...
  components:
     schemas:
        ErrResp:
          type: object
          properties:
            error_code:
              $ref: "#/components/schemas/ErrCode"
            error_msg:
              type: string
        ErrCode:
           type: integer
           description: |
             2 - invalid request
  
  ...
  </code></pre>
  
  <p>Generation is performed using this command:</p>
  
  <pre><code>openapi-generator generate -i myAPI.yaml -g typescript-fetch -o ./myAPI"
  </code></pre>
  
  <p>and have warning:</p>
  
  <pre><code>[main] WARN  o.o.codegen.utils.ModelUtils - Failed to get the schema name: #/errors/400
  </code></pre>
  
  <p>At the same time, the check for editor.swagger.io passes without errors and warnings - the file is described correctly. I temporarily found the following solution on how to avoid this warning, but I want to find out why it occurs, and I would like to keep the current structure in order to avoid redundancy.</p>
  
  <p>The solution is:
  Instead</p>
  
  <pre><code>responses:
     '400':
        $ref: "#/errors/400"
  </code></pre>
  
  <p>the following is used, in which case there are no warnings:</p>
  
  <pre><code>responses:
       '400':
          description: invalid request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrResp"
  </code></pre>