mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-06-02 23:10:52 +00:00
skip warning, better code format for jetbrain http client generator (#18299)
This commit is contained in:
parent
1024c7733e
commit
ac14e66da1
@ -369,13 +369,14 @@ public class JetbrainsHttpClientClientCodegen extends DefaultCodegen implements
|
|||||||
|
|
||||||
for (int i = 0; i < items.size(); i++) {
|
for (int i = 0; i < items.size(); i++) {
|
||||||
jsonBuilder.append(JSON_ESCAPE_DOUBLE_QUOTE).append(items.get(i)).append(JSON_ESCAPE_DOUBLE_QUOTE);
|
jsonBuilder.append(JSON_ESCAPE_DOUBLE_QUOTE).append(items.get(i)).append(JSON_ESCAPE_DOUBLE_QUOTE);
|
||||||
if (i < items.size() - 1) {jsonBuilder.append(",");}
|
if (i < items.size() - 1) {
|
||||||
|
jsonBuilder.append(",");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
jsonBuilder.append("]");
|
jsonBuilder.append("]");
|
||||||
|
|
||||||
ret = ret + JSON_ESCAPE_DOUBLE_QUOTE + key + JSON_ESCAPE_DOUBLE_QUOTE + ": " + jsonBuilder;
|
ret = ret + JSON_ESCAPE_DOUBLE_QUOTE + key + JSON_ESCAPE_DOUBLE_QUOTE + ": " + jsonBuilder;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
LOGGER.warn("Value type unrecognised: " + value.getClass());
|
LOGGER.warn("Value type unrecognised: " + value.getClass());
|
||||||
//WARNING: here we are undoing what is done in "add comma unless last attribute"
|
//WARNING: here we are undoing what is done in "add comma unless last attribute"
|
||||||
// This is meant to avoid dangling commas if we encounter an unknown type
|
// This is meant to avoid dangling commas if we encounter an unknown type
|
||||||
@ -394,4 +395,13 @@ public class JetbrainsHttpClientClientCodegen extends DefaultCodegen implements
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeQuotationMark(String input) {
|
||||||
|
return input;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user