You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For inline object definitions, the generator uses "inline_response12323" as a model name which later ends up in a lot of Java classes with meaningless names like InlineResponse12323.
I propose to use "Title" attribute whenever provided. This attribute is part of Swagger definition (not specific to Swagger by comes from JSON schema) and could be added to any schema object.
Below is JSON example. For such example I would like to have Java class name for parameter be "ModifyCatRequest" (instead of "Data") and for response ModifyCatResponse instead of InlineResponse123.
I believe it is not specific for Java client, but should be a generic approach to use "title" as model name whenever provided. Other tools (e.g. Swagger UI) are using this approach too
Change is already working at my laptop, so if community supports this change I'll send pull request
The text was updated successfully, but these errors were encountered:
dmytrobr
changed the title
Uses "Title" as model name if provided in swagger definition
Use "Title" as model name if provided in swagger definition
May 14, 2016
For inline object definitions, the generator uses "inline_response12323" as a model name which later ends up in a lot of Java classes with meaningless names like InlineResponse12323.
I propose to use "Title" attribute whenever provided. This attribute is part of Swagger definition (not specific to Swagger by comes from JSON schema) and could be added to any schema object.
Below is JSON example. For such example I would like to have Java class name for parameter be "ModifyCatRequest" (instead of "Data") and for response ModifyCatResponse instead of InlineResponse123.
I believe it is not specific for Java client, but should be a generic approach to use "title" as model name whenever provided. Other tools (e.g. Swagger UI) are using this approach too
Change is already working at my laptop, so if community supports this change I'll send pull request
The text was updated successfully, but these errors were encountered: