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 class
AbstractTypeScriptClientCodegen.ParameterExpander.Location
Where the parameter is located in the request.static class
AbstractTypeScriptClientCodegen.ParameterExpander.ParamStyle
How 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 void
appendToParameterName(char c)
String
buildPathEntry()
protected static String
escapeForQuotedJSString(String string)
protected String
nullableQuotedJSString(@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()
-
-