Class AbstractTypeScriptClientCodegen.ParameterExpander
- java.lang.Object
-
- org.openapitools.codegen.languages.AbstractTypeScriptClientCodegen.ParameterExpander
-
- Enclosing class:
- AbstractTypeScriptClientCodegen
public static class AbstractTypeScriptClientCodegen.ParameterExpander extends Object
Help generating code for any kind of URL parameters (path, matrix, query).Generators may use this class when substituting URL-parameter-placeholders with generated code:
While parsing placeholders character-by-character, this class helps accumulating these characters and building the final placeholder name.
With the placeholder name, this class tries to find the parameter in the operation. The class then uses this parameter to build code that is usable by the generator.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractTypeScriptClientCodegen.ParameterExpander.LocationWhere the parameter is located in the request.static classAbstractTypeScriptClientCodegen.ParameterExpander.ParamStyleHow the parameter is formatted/converted/encoded in the actual request.
-
Constructor Summary
Constructors Constructor Description ParameterExpander(CodegenOperation op, Function<String,String> toParameterName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendToParameterName(char c)StringbuildPathEntry()protected static StringescapeForQuotedJSString(String string)protected StringnullableQuotedJSString(@Nullable String string)
-
-
-
Constructor Detail
-
ParameterExpander
public ParameterExpander(CodegenOperation op, Function<String,String> toParameterName)
-
-
Method Detail
-
appendToParameterName
public void appendToParameterName(char c)
-
buildPathEntry
public String buildPathEntry()
-
-