Skip to content
Snippets Groups Projects
Commit d8747d08 authored by Jonas Leder's avatar Jonas Leder
Browse files

add indent on root level

parent 0117b59c
Branches
No related tags found
1 merge request!1Jonasled master patch 92385
Pipeline #8470 passed
......@@ -71,10 +71,10 @@ string ParseJson(string json, int indent = 0)
if (Regex.IsMatch(json, @"^\s\["))
{
JArray jsonArr = JArray.Parse(json);
return "@OA\\JsonContent(\n type=\"array\",\n" + ParseJsonArray(jsonArr) + "),";
return IndentString("@OA\\JsonContent(\n type=\"array\",\n" + ParseJsonArray(jsonArr) + "),", indent);
}
JObject jsonObj = JObject.Parse(json);
return "@OA\\JsonContent(\n type=\"object\",\n" + ParseJsonObject(jsonObj) + "),";
return IndentString("@OA\\JsonContent(\n type=\"object\",\n" + ParseJsonObject(jsonObj) + "),", indent);
}
string IndentString(string stringToIndent, int indent)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment