Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Symfony-api-doc-generator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonas Leder
Symfony-api-doc-generator
Commits
d8747d08
Commit
d8747d08
authored
Aug 18, 2022
by
Jonas Leder
Browse files
Options
Downloads
Patches
Plain Diff
add indent on root level
parent
0117b59c
Branches
Branches containing commit
No related tags found
1 merge request
!1
Jonasled master patch 92385
Pipeline
#8470
passed
Aug 18, 2022
Stage: build
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Symfony-api-doc-generator/Program.cs
+2
-2
2 additions, 2 deletions
Symfony-api-doc-generator/Program.cs
with
2 additions
and
2 deletions
Symfony-api-doc-generator/Program.cs
+
2
−
2
View file @
d8747d08
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment