- Install Node.js.
- Clone this repo and run
npm ciin the repo root.
Build an example doc locally:
npm run build --build-version=0.0.1 --selectedThen, 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.
See:
- ./openapi/README.md for a guide on updating the document
- ./openapi/paths/README.md for a guide on adding paths to the API
- ./openapi/components/README.md for a guide on adding components to the API, for reuse within multiple paths
If the change is a new feature or will be available in a future major release make your changes against the develop
branch and create a pull request against develop.
If the change is a bug fix or will be available in a future minor release make your changes against the master
branch and also create a pull request to merge the changes into the develop branch.
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
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/pathsfolder. - 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
$refto it inside of youropenapi/openapi.yamlfile. - 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.mdfor more information.