Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1505,14 +1505,15 @@ public String snakeCase(String name) {
}

/**
* Capitalize the string
* Capitalize the string. Please use org.openapitools.codegen.utils.StringUtils.camelize instead as this method will be deprecated.
*
* @param name string to be capitalized
* @return capitalized string
* @deprecated
*/
@SuppressWarnings("static-method")
public String initialCaps(String name) {
return StringUtils.capitalize(name);
return camelize(name);
Copy link
Contributor

@osharav osharav Feb 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

camelize removes underscores which may cause issues with the InlineModelResolver and other places where underscores are being introduced. in the cpp rest sdk client generator this causes the class names to be different than the file names (some method calls have used initialCaps and some have not) which causes import errors.
I will open a dedicated issue for this.
Regards,
Omer.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please open a separate issue with a (minimal) spec to reproduce the issue.

}

/**
Expand Down