- Install Node.js.
- Clone this repo and run
npm ci
in the repo root.
Build an example doc locally:
npm run build --build-version=0.0.1 --selected
Then, start the reference docs preview server in the docs
folder:
python3 -m http.server --directory docs;
Then, visit http://127.0.0.1:8000/?debug.
Note the version selector at the top-left of the page, under the Schoolbox logo. This allows selection of:
- previous versions
- pre-release versions
Bundles the current definition to docs/builds/$buildVersion.yaml
, and also
creates a dropdown option for this build so that it may be selected.
(The set of options is stored in docs/builds.json
.)
$buildVersion
is expected to match the Schoolbox version to which the current
definition applies.
If --selected
is passed, this build will be selected in the dropdown by
default: otherwise, the default selected build will not be changed.
Recreates docs/builds.json
with the builds which already exist in
docs/builds
.
Validates the definition.
Create a new release whose version number matches the Schoolbox version number you wish to create a release for.
Releases may be created at https://github.com/alaress/schoolbox-api-docs/releases.
- tag against develop
- include the beta number, e.g. 22.1.0-beta3
- check the pre-release checkbox
- tag against develop (for now: this may change to tag against master)
- do not include the beta number, e.g. 22.1.0
- leave the pre-release checkbox unchecked
Design and layout options are configurable using attributes within the rapi-doc
tag in /docs/index.html
More information is available at https://rapidocweb.com/api.html
- Navigate to the
openapi/paths
folder. - Add a new YAML file named like your URL endpoint, except replacing
/
with@
and putting path parameters into curly braces like{example}
. - Add the path and a
$ref
to it inside of youropenapi/openapi.yaml
file. - Define the parameters, request bodies, responses and schemas that the path uses.
- To begin with, it is fine to define these things in the path itself; as your
path begins to use more components in common with other paths, you may wish
to extract the common components to the
openapi/components/
sub-folders. Seeopenapi/components/README.md
for more information.