Skip to content

Commit

Permalink
reset the context
Browse files Browse the repository at this point in the history
  • Loading branch information
millotp committed Jan 29, 2025
1 parent 4040edb commit dbc5c4c
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@ public String toString() {
}

public void addMethodCall(Map<String, Object> context, ParametersWithDataType paramsType, CodegenOperation ope) throws CTSException {
// for dynamic snippets, we need to reset the context because the order if generation is random
context.put("method", method);
context.put("returnType", null);
context.put("requestOptions", null);
context.put("parameters", null);
context.put("parametersWithDataType", null);
context.put("parametersWithDataTypeMap", null);

if (ope.returnType != null && ope.returnType.length() > 0) {
context.put("returnType", camelize(ope.returnType));
}
Expand Down

0 comments on commit dbc5c4c

Please sign in to comment.