Skip to content

Conversation

@wing328
Copy link
Member

@wing328 wing328 commented Jan 5, 2019

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: master, 3.4.x, 4.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

Replacing it with camelize and will completely remove it in 4.x release

cc @OpenAPITools/generator-core-team

@wing328 wing328 added this to the 4.0.0 milestone Jan 5, 2019
@wing328 wing328 merged commit 60776b8 into master Jan 7, 2019
@wing328 wing328 deleted the deco_initalcaps branch January 7, 2019 09:47
@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.

@osharav
Copy link
Contributor

osharav commented Feb 13, 2019

#2003 could be related

@wing328
Copy link
Member Author

wing328 commented Feb 13, 2019

@osharav thanks for reviewing the change. I could be wrong but I don't think #2003 is related as the user has confirmed 3.4.4 (which does not include this change) also has the issue.

@osharav
Copy link
Contributor

osharav commented Feb 13, 2019

True, but I have another example with a generated inline response which shows the behavior - I'll attach it to the issue I need to open.

A-Joshi pushed a commit to ihsmarkitoss/openapi-generator that referenced this pull request Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants