-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Issue Description
When generating client code (e.g., Java) from the OpenAPI specification, the generated API class defaults to DefaultApi
if no tags are defined. This can lead to unclear naming and organization in the generated SDK.
Proposed Solution
Add meaningful tags to the OpenAPI spec to ensure that generated code assigns proper names to API classes instead of falling back to DefaultApi
.
Example Fix
Instead of:
paths:
/example:
get:
summary: Example endpoint
operationId: getExample
responses:
"200":
description: Successful response
Update to:
paths:
/example:
get:
summary: Example endpoint
operationId: getExample
tags:
- Example
responses:
"200":
description: Successful response
Expected Outcome
- The generated Java client should use
ExampleApi
instead ofDefaultApi
. - Improves maintainability and readability of the generated code.
Additional Context
This issue affects OpenAPI clients using tools such as openapi-generator
and swagger-codegen
. Without tags, API classes are ambiguously named, making integration harder for developers.
tobythomas-hh
Metadata
Metadata
Assignees
Labels
No labels