Skip to content

Commit

Permalink
fix(openapi): OpenAPI-generated class names don't have underscores
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Nuri <[email protected]>
  • Loading branch information
manusa authored Oct 24, 2024
1 parent 5d82d25 commit 7082932
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ public SchemaUtils(GeneratorSettings settings) {
* @return the simple class name associated to the provided Schema reference.
*/
public static String refToClassName(String ref) {
return capitalize(ref.substring(ref.lastIndexOf('.') + 1));
return capitalize(ref.substring(ref.lastIndexOf('.') + 1))
// Remove underscores from Class Names, this doesn't look good in Java :)
.replace("_", "");
}

private String refToModelPackage(String ref) {
Expand Down

0 comments on commit 7082932

Please sign in to comment.