File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
src/main/java/io/swagger/codegen Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ package io .swagger .codegen .handlebars .helpers ;
2+
3+ import com .github .jknack .handlebars .Helper ;
4+ import com .github .jknack .handlebars .Options ;
5+
6+ public class BracesHelper implements Helper <String > {
7+
8+ public static final String NAME = "braces" ;
9+ private static final String RIGHTT_ORIENTATION = "right" ;
10+ private static final String LEFT_CURLY_BRACES = "{{" ;
11+ private static final String RIGHT_CURLY_BRACES = "}}" ;
12+
13+ @ Override
14+ public Object apply (String orientation , Options options ) {
15+ if (RIGHTT_ORIENTATION .equalsIgnoreCase (orientation )) {
16+ return RIGHT_CURLY_BRACES ;
17+ }
18+ return LEFT_CURLY_BRACES ;
19+ }
20+
21+
22+ }
Original file line number Diff line number Diff line change 1515import io .swagger .codegen .CodegenResponse ;
1616import io .swagger .codegen .CodegenSecurity ;
1717import io .swagger .codegen .SupportingFile ;
18+ import io .swagger .codegen .handlebars .helpers .BracesHelper ;
1819import io .swagger .codegen .handlebars .helpers .HasHelper ;
1920import io .swagger .codegen .handlebars .helpers .HasNotHelper ;
2021import io .swagger .codegen .handlebars .helpers .IsHelper ;
@@ -3257,6 +3258,7 @@ public void addHandlebarHelpers(Handlebars handlebars) {
32573258 handlebars .registerHelper (HasHelper .NAME , new HasHelper ());
32583259 handlebars .registerHelper (IsNotHelper .NAME , new IsNotHelper ());
32593260 handlebars .registerHelper (HasNotHelper .NAME , new HasNotHelper ());
3261+ handlebars .registerHelper (BracesHelper .NAME , new BracesHelper ());
32603262 }
32613263
32623264 @ Override
You can’t perform that action at this time.
0 commit comments