-
Notifications
You must be signed in to change notification settings - Fork 426
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
src/main/java/io/swagger/codegen/handlebars/helpers/BracesHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package io.swagger.codegen.handlebars.helpers; | ||
|
||
import com.github.jknack.handlebars.Helper; | ||
import com.github.jknack.handlebars.Options; | ||
|
||
public class BracesHelper implements Helper<String> { | ||
|
||
public static final String NAME = "braces"; | ||
private static final String RIGHTT_ORIENTATION = "right"; | ||
private static final String LEFT_CURLY_BRACES = "{{"; | ||
private static final String RIGHT_CURLY_BRACES = "}}"; | ||
|
||
@Override | ||
public Object apply(String orientation, Options options) { | ||
if (RIGHTT_ORIENTATION.equalsIgnoreCase(orientation)) { | ||
return RIGHT_CURLY_BRACES; | ||
} | ||
return LEFT_CURLY_BRACES; | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters