private static void enforceParameterTypes(@NotNull TemplateMetadata metadata,@NotNull Map<String,Object> args){
  for (  Parameter p : metadata.getParameters()) {
    Object o=args.get(p.id);
    if (o == null) {
      continue;
    }
switch (p.type) {
case STRING:
      if (!(o instanceof String)) {
        args.put(p.id,o.toString());
      }
    break;
case BOOLEAN:
  if (!(o instanceof Boolean)) {
    args.put(p.id,Boolean.parseBoolean(o.toString()));
  }
break;
case ENUM:
break;
case SEPARATOR:
break;
}
}
convertApisToInt(args);
}

private static void enforceParameterTypes ( @ NotNull TemplateMetadata metadata , @ NotNull Map < String , Object > args ) { for ( Parameter p : metadata . getParameters ( ) ) { Object o = args . get ( p . id ) ; if ( o == null ) { continue ; } switch ( p . type ) { case STRING : if ( ! ( o instanceof String ) ) { args . put ( p . id , o . toString ( ) ) ; } break ; case BOOLEAN : if ( ! ( o instanceof Boolean ) ) { args . put ( p . id , Boolean . parseBoolean ( o . toString ( ) ) ) ; } break ; case ENUM : break ; case SEPARATOR : break ; } } convertApisToInt ( args ) ; }
iterate through parameters and ensure the given map has the correct for each parameter .
