Skip to content

Commit

Permalink
Fixes #256
Browse files Browse the repository at this point in the history
logicForParamsAndMethodsNaming with DISPLAY_NAME
creates methods beginning with upper case
  • Loading branch information
Aleksandar Stojsavljevic committed May 14, 2018
1 parent 1f90a82 commit d93bb43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ public static String getActionName(ApiActionMetadata apiActionMetadata) {

if (Config.getLogicForParamsAndMethodsNaming() == LogicForParamsAndMethodsNaming.DISPLAY_NAME
&& !StringUtils.isEmpty(apiActionMetadata.getDisplayName())) {
return cleanNameForJava(apiActionMetadata.getDisplayName());
return StringUtils.uncapitalize(cleanNameForJava(apiActionMetadata.getDisplayName()));
} else if (Config.getLogicForParamsAndMethodsNaming() == LogicForParamsAndMethodsNaming.ANNOTATION) {
for (AnnotationRef annotation : apiActionMetadata.getAnnotations()) {
if ("(javaName)".equals(annotation.name())) {
Expand Down
8 changes: 4 additions & 4 deletions src/test/resources/ramls/github/issue-250.raml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ types:
properties:
firstName:
type: string
displayName: firstNameDisplayName
displayName: First Name Display Name
(javaName): firstNameJavaName

/test:
Expand All @@ -24,12 +24,12 @@ types:
(javaName): uriParamJavaName
type: integer
get:
displayName: getMethodDisplayName
displayName: get method display name
(javaName): getMethodJavaName
queryParameters:
queryParam:
type: string
displayName: queryParamDisplayName
displayName: Query Param Display Name
(javaName): queryParamJavaName
headers:
headerParam:
Expand All @@ -43,7 +43,7 @@ types:
type: User
/accept:
put:
displayName: putMethodDisplayName
displayName: Put Method Display Name
(javaName): putMethodJavaName
body:
application/json:
Expand Down

0 comments on commit d93bb43

Please sign in to comment.