Skip to content

Conversation

wing328
Copy link
Contributor

@wing328 wing328 commented Mar 23, 2015

This PR is very similar to #535 (Better variable and model property naming for Java): update android-java codegen with better naming convention:

  • in model template, use {{baseName}} instead of {{name}} for @JsonProperty (since we need the original name as the JSON key)
  • camelized model name (e.g. phone_number => PhoneNumber)
  • for property and variable name, camelize with lower first character (e.g. phone_number => phoneNumber)
  • for reserved words or word starting with number, append _ (e.g. return => _return, 123number => _123number)
  • update test case and Petstore sample for android-java

fehguy added a commit that referenced this pull request Mar 23, 2015
better naming convention for android-java codegen
@fehguy fehguy merged commit 0cf1c3c into swagger-api:develop_2.0 Mar 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants