Skip to content

Commit

Permalink
Generate JSON schema HTML doc when bash build.sh --doc is called (#1289)
Browse files Browse the repository at this point in the history
* Generate JSON schema HTML doc when bash build.sh --doc is called

* changelog

* [MegaLinter] Apply linters fixes

Co-authored-by: nvuillam <[email protected]>
  • Loading branch information
nvuillam and nvuillam authored Feb 20, 2022
1 parent cebe7f9 commit 58f6553
Show file tree
Hide file tree
Showing 7 changed files with 1,667 additions and 172 deletions.
64 changes: 32 additions & 32 deletions .automation/generated/flavors-stats.json
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,8 @@
2452855
],
[
"2022-02-20T01:47:14",
2453622
"2022-02-20T19:31:32",
2454132
]
],
"ci_light": [
Expand Down Expand Up @@ -1167,8 +1167,8 @@
7451
],
[
"2022-02-20T01:47:14",
7487
"2022-02-20T19:31:32",
7489
]
],
"dart": [
Expand Down Expand Up @@ -1753,8 +1753,8 @@
2287
],
[
"2022-02-20T01:47:14",
2312
"2022-02-20T19:31:32",
2314
]
],
"documentation": [
Expand Down Expand Up @@ -2339,8 +2339,8 @@
40938
],
[
"2022-02-20T01:47:14",
41083
"2022-02-20T19:31:32",
41222
]
],
"dotnet": [
Expand Down Expand Up @@ -2925,8 +2925,8 @@
283629
],
[
"2022-02-20T01:47:14",
284006
"2022-02-20T19:31:32",
284257
]
],
"go": [
Expand Down Expand Up @@ -3511,8 +3511,8 @@
8152
],
[
"2022-02-20T01:47:14",
8166
"2022-02-20T19:31:32",
8194
]
],
"java": [
Expand Down Expand Up @@ -4097,8 +4097,8 @@
59458
],
[
"2022-02-20T01:47:14",
59576
"2022-02-20T19:31:32",
59664
]
],
"javascript": [
Expand Down Expand Up @@ -4683,8 +4683,8 @@
90582
],
[
"2022-02-20T01:47:14",
90836
"2022-02-20T19:31:32",
90920
]
],
"php": [
Expand Down Expand Up @@ -5269,8 +5269,8 @@
4106
],
[
"2022-02-20T01:47:14",
4117
"2022-02-20T19:31:32",
4141
]
],
"python": [
Expand Down Expand Up @@ -5855,8 +5855,8 @@
59453
],
[
"2022-02-20T01:47:14",
59779
"2022-02-20T19:31:32",
59905
]
],
"ruby": [
Expand Down Expand Up @@ -6437,8 +6437,8 @@
1864
],
[
"2022-02-20T01:47:14",
1889
"2022-02-20T19:31:32",
1891
]
],
"rust": [
Expand Down Expand Up @@ -7019,8 +7019,8 @@
1604
],
[
"2022-02-20T01:47:14",
1645
"2022-02-20T19:31:32",
1664
]
],
"salesforce": [
Expand Down Expand Up @@ -7605,8 +7605,8 @@
10753
],
[
"2022-02-20T01:47:14",
10817
"2022-02-20T19:31:32",
10829
]
],
"scala": [
Expand Down Expand Up @@ -8187,8 +8187,8 @@
1443
],
[
"2022-02-20T01:47:14",
1450
"2022-02-20T19:31:32",
1452
]
],
"swift": [
Expand Down Expand Up @@ -8769,8 +8769,8 @@
1484
],
[
"2022-02-20T01:47:14",
1491
"2022-02-20T19:31:32",
1493
]
],
"terraform": [
Expand Down Expand Up @@ -9355,8 +9355,8 @@
39583
],
[
"2022-02-20T01:47:14",
39786
"2022-02-20T19:31:32",
39922
]
]
}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Note: Can be used with `megalinter/megalinter@beta` in your GitHub Action mega-l

- Fixes
- Use latest version of npm
- Generate JSON Schema HTML Documentation when building documentation ([#1287](https://github.com/megalinter/megalinter/issues/1287))

- Linter versions upgrades
- [cpplint](https://github.com/cpplint/cpplint) from 1.5.5 to **1.6.0** on 2022-02-20
Expand Down
9 changes: 9 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ MD_FILES=$(find . -type f -name "*.md" -not -path "*/node_modules/*" -not -path
# shellcheck disable=SC2086
MD_FILES_2=$(find . -type f -name "*.md" -not -path "*/node_modules/*" -not -path "*/.automation/*" -path "*/licenses/*") && npx markdown-table-formatter $MD_FILES_2

# Format JSON schema HTML documentation if --doc is set
for i in "$@"; do
if [[ $i == "--doc" ]]; then
echo "Generating JSON Schema HTML documentation"
cd .automation && bash build_schemas_doc.sh && cd ..
break
fi
done

# Build online documentation
if type python3 >/dev/null 2>/dev/null; then
python3 -m mkdocs build
Expand Down
1,596 changes: 1,506 additions & 90 deletions docs/json-schemas/configuration.html

Large diffs are not rendered by default.

161 changes: 113 additions & 48 deletions docs/json-schemas/descriptor.html

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion docs/json-schemas/schema_doc.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ body {
padding: 1rem !important;
}

.examples pre {
margin-bottom: 0;
}

.highlight.jumbotron {
padding: 1rem !important;
}
Expand Down Expand Up @@ -173,4 +177,4 @@ body {
.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
.highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */
.highlight .il { color: #40a070 } /* Literal.Number.Integer.Long */
.highlight .il { color: #40a070 } /* Literal.Number.Integer.Long */
2 changes: 1 addition & 1 deletion docs/json-schemas/schema_doc.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 58f6553

Please sign in to comment.