Skip to content

Commit

Permalink
Merge pull request #6 from jelu/wetzel
Browse files Browse the repository at this point in the history
Documentation
  • Loading branch information
jelu authored May 28, 2024
2 parents e5cee3a + e15d27e commit beb31f7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,19 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
pip install json-schema-for-humans
mkdir pages
generate-schema-doc dns-metrics.schema.json pages
( cd pages; ln -s dns-metrics.schema.html index.html )
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Build
run: |
npm install wetzel
npx wetzel dns-metrics.schema.json > SCHEMA.md
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "pages"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
A JSON schema to define DNS metrics that tools can use to generate compatible
JSON metrics and statistics.

## Documentation

[Documentation](SCHEMA.md) is generated automatically with [wetzel](https://www.npmjs.com/package/wetzel)
but please note that it does not handle everything correctly, for example
the oneOf `"type": "..."` is currently not displayed correctly.

## Test

```
Expand Down
3 changes: 3 additions & 0 deletions dns-metrics.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
],
"$defs": {
"header": {
"title": "DNS Metric Header",
"description": "A header object that contains information on the schema version and parameters related to the run",
"type": "object",
"properties": {
Expand Down Expand Up @@ -81,6 +82,7 @@
"required": [ "schema_version", "generator", "generator_version", "stats_interval" ]
},
"event": {
"title": "DNS Metric Event",
"description": "A generic event object for tools to give context on the run",
"type": "object",
"properties": {
Expand All @@ -96,6 +98,7 @@
"required": [ "msg" ]
},
"stats": {
"title": "DNS Metric Stats",
"description": "A stats object with the metrics",
"type": "object",
"properties": {
Expand Down

0 comments on commit beb31f7

Please sign in to comment.