diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 365da74..2f4635a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,7 +18,14 @@ jobs: uses: actions/checkout@v4 with: submodules: true - - uses: Swatinem/rust-cache@v2 + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/*.nimble') }} - uses: jiro4989/setup-nim-action@v1 with: nim-version: '2.2.4' diff --git a/docs/src/introduction.md b/docs/src/introduction.md index 39af194..dd6522a 100644 --- a/docs/src/introduction.md +++ b/docs/src/introduction.md @@ -15,3 +15,8 @@ Via `nimble install`: ```text nimble install json_serialization ``` + +## API documentation + +This guide covers basic usage of `json_serialization` - for details, see the +[API reference](./api/). diff --git a/docs/src/reference.md b/docs/src/reference.md index 9af94b4..bc0344f 100644 --- a/docs/src/reference.md +++ b/docs/src/reference.md @@ -2,6 +2,9 @@ +This page provides an overview of the `json_serialization` API - for details, see the +[API reference](./api/). + ## Parsing ### Common API @@ -283,7 +286,7 @@ type Seven = "Seven" ``` -`nim-json-serialization` automatically detects the expected representation for each enum based on its declaration. +`json_serialization` automatically detects the expected representation for each enum based on its declaration. - `Fruit` expects string literals. - `Drawer` and `Number` expect numeric literals. - `Mixed` (with both string and numeric values) is disallowed by default. diff --git a/json_serialization.nimble b/json_serialization.nimble index 800ae18..4cb463a 100644 --- a/json_serialization.nimble +++ b/json_serialization.nimble @@ -59,3 +59,4 @@ task mdbook, "Install mdbook (requires cargo)": task docs, "Generate API documentation": exec "mdbook build docs" + exec nimc & " doc " & "--git.url:https://github.com/status-im/nim-json-serialization --git.commit:master --outdir:docs/book/api --project json_serialization"