fix anyof toUrlQuery string in java native (#14715)

This commit is contained in:
William Cheng
2023-02-16 14:46:57 +08:00
committed by GitHub
parent 71c2abf81c
commit d7e75ebe5d
3 changed files with 236 additions and 0 deletions

View File

@@ -204,5 +204,42 @@ public class GmFruit extends AbstractOpenApiSchema {
return (Banana)super.getActualInstance();
}
/**
* Convert the instance into URL query string.
*
* @return URL query string
*/
public String toUrlQueryString() {
return toUrlQueryString(null);
}
/**
* Convert the instance into URL query string.
*
* @param prefix prefix of the query string
* @return URL query string
*/
public String toUrlQueryString(String prefix) {
String suffix = "";
String containerSuffix = "";
String containerPrefix = "";
if (prefix == null) {
// style=form, explode=true, e.g. /pet?name=cat&type=manx
prefix = "";
} else {
// deepObject style e.g. /pet?id[name]=cat&id[type]=manx
prefix = prefix + "[";
suffix = "]";
containerSuffix = "]";
containerPrefix = "[";
}
StringJoiner joiner = new StringJoiner("&");
return null;
}
}