This tool build documentation from OpenRPC schema. It based on OpenRPC docs-react component and create-react-app.
You must put open-rpc schema into /app/src/schema/openrpc.json file, then run yarn run build.
Also you can put any additional files into public directory, all files from public will be moved into build directory with built documentation.
Tool support all environment variables from create-react-app
| Name | Possible values | Default | Description |
|---|---|---|---|
REACT_APP_THEME |
dark, light |
light |
Application theme |
All supported docker tags can be found here.
Run into your shell (your open-rpc schema must be located in ./path/to/your/openrpc.json):
$ mkdir ./public # create directory for generated assets
$ docker run \
--rm \
--user "$(id -u):$(id -g)" \
-v $(pwd)/path/to/your/openrpc.json:/app/src/schema/openrpc.json:ro \
-v $(pwd)/public:/app/build:rw \
avtodev/open-rpc-docs-builder:1.3 \
yarn run buildAnd then watch into ./public directory.
FROM avtodev/open-rpc-docs-builder:1.3 AS builder
# Copy openrpc.json file into `/app/src/schemas` derictory
COPY --chown=node ./openrpc.json /app/src/schemas/openrpc.json
# You can copy additional json-schema files into public directory
COPY --chown=node ./schemas/json-schema /app/public/schema
RUN yarn run build
# Optional you can copy built documentation into any other container (eg.: nginx)
FROM alpine:latest
COPY --from=builder /app/build /publicNew versions publishing is very simple - just update dependencies version(s) in ./package.json file (or make any another changes) and "publish" new release using repo releases page. This action will trigger docker images (re)building (eg.: release v1.2.3 will create or update docker images with tags 1.2 and 1.2.3).
Release version (and git tag, of course) MUST starts with
vprefix (eg.:v0.0.1orv1.2.3) and follows semantic versioning rulesDo not forget to update docker image version tag in "usage example" above
MIT. Use anywhere for your pleasure.
