I use openapi-generator-cli to generate a java client from an openapi 3.0.1 yaml file. If you have a request with multiple responses, the generator creates a java class for each response, but actually does not use those java classes anywhere. So it creates lots of unused files and lots of unused imports. For example check out this yaml file:
openapi: 3.0.1
info:
title: example-api
description: 'Example API'
version: 1.0.0
servers:
- url: /example/api/v1
paths:
/createRequest:
get:
summary: Creates a request
responses:
'200':
description: OK
content:
'*/*':
schema:
type: object
properties:
status:
type: string
example: OK
description: Status of request
'400':
description: Error 400
content:
'*/*':
schema:
type: object
properties:
status:
type: string
example: Error 400
'401':
description: Error 401
content:
'*/*':
schema:
type: object
properties:
status:
type: string
example: Error 401
'402':
description: Error 402
content:
'*/*':
schema:
type: object
properties:
status:
type: string
example: Error 402
'490':
description: Error 490
content:
'*/*':
schema:
type: object
properties:
status:
type: string
example: Error 490
'499':
description: Error 499
content:
'*/*':
schema:
type: object
properties:
status:
type: string
example: Error 499
The generator creates files like CreateRequestGet400Response, CreateRequestGet401Response or CreateRequestGet402Response and so on without using them anywhere. Is there any option I can use to disable generating these files?