Skip to content

Commit

Permalink
feat: serve json schema in ecalc docs
Browse files Browse the repository at this point in the history
Current json schema served in docs. This schema will represent
the latest changes on main (bleeding).

Will add support for versioning soon, this is atm. a PoC.
  • Loading branch information
TeeeJay committed Nov 27, 2024
1 parent 924c38f commit acc8e28
Show file tree
Hide file tree
Showing 8 changed files with 4,452 additions and 5 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/docs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ jobs:
- name: Generate CLI reference
run: |
cd src
poetry run python generate_docs.py > ../docs/docs/about/references/cli_reference.md
poetry run python generate_docs.py > ../docs/docs/about/getting_started/cli/cli_reference.md
- name: Generate JSON Schema
run: |
cd src
poetry run python generate_json_schema.py > ../docs/docs/about/getting_started/yaml/ecalc_json_schema.json
- name: Setup node
uses: actions/setup-node@v4
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/docs-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ jobs:
- name: Generate CLI reference
run: |
cd src
poetry run python generate_docs.py > ../docs/docs/about/references/cli_reference.md
poetry run python generate_docs.py > ../docs/docs/about/getting_started/cli/cli_reference.md
- name: Generate JSON Schema
run: |
cd src
poetry run python generate_json_schema.py > ../docs/docs/about/getting_started/yaml/ecalc_json_schema.json
- name: Setup node
uses: actions/setup-node@v4
Expand Down
9 changes: 8 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,14 @@ $ npm run serve
In order to generate the CLI reference documentation, use the following (from `src`):
```
$ cd src
$ poetry run python generate_docs.py > ../docs/docs/about/references/cli_reference.md
$ poetry run python generate_docs.py > ../docs/docs/about/getting_started/cli/cli_reference.md
```

### Generate JSON Schema
In order to generate the JSON Schema documentation, use the following (from `src`):
```
$ cd src
$ poetry run python generate_json_schema.py > ../docs/docs/about/getting_started/yaml/ecalc_json_schema.json
```

Then build the documentation:
Expand Down
Loading

0 comments on commit acc8e28

Please sign in to comment.