Bug Report Checklist
Description
When generating a client from a Swagger 2.0 specification containing a $ref to a schema that is not defined, OpenAPI Generator completes successfully instead of reporting an unresolved reference.
The generated library contains references to the missing model, but no corresponding model file is generated.
openapi-generator version
v7.25.0
OpenAPI declaration file content or url
swagger: '2.0'
info:
title: Undefined Schema Reproduction
version: '1.0.0'
paths:
/test:
post:
parameters:
- name: body
in: body
required: true
schema:
$ref: '#/definitions/DoesNotExist'
responses:
'200':
description: OK
Generation Details
The issue appears to be language-independent
Steps to reproduce
Generate a client library using the above schema and inspect the results.
Related issues/PRs
Suggest a fix
When a schema definition is missing an error should be raised as is done for 3.0.x declarations
Bug Report Checklist
Description
When generating a client from a Swagger 2.0 specification containing a $ref to a schema that is not defined, OpenAPI Generator completes successfully instead of reporting an unresolved reference.
The generated library contains references to the missing model, but no corresponding model file is generated.
openapi-generator version
v7.25.0
OpenAPI declaration file content or url
Generation Details
The issue appears to be language-independent
Steps to reproduce
Generate a client library using the above schema and inspect the results.
Related issues/PRs
Suggest a fix
When a schema definition is missing an error should be raised as is done for 3.0.x declarations