### Start Local Documentation Server
Source: https://github.com/discourse/discourse_api_docs/blob/main/README.md
Installs dependencies and starts the local server to preview documentation changes.
```bash
npm install
node server.js
```
--------------------------------
### Verify JSON Documentation
Source: https://github.com/discourse/discourse_api_docs/blob/main/README.md
Starts the local server specifically to load the generated JSON file for verification.
```bash
node server.js json
```
--------------------------------
### Generate OpenAPI Specification
Source: https://github.com/discourse/discourse_api_docs/blob/main/README.md
Executes rswag specs to generate the OpenAPI YAML file and copies it to the documentation repository.
```bash
rake rswag:specs:swaggerize && cp openapi/openapi.yaml ~/code/discourse_api_docs/openapi.yml
```
--------------------------------
### Convert YAML to JSON
Source: https://github.com/discourse/discourse_api_docs/blob/main/README.md
Converts the OpenAPI YAML file to JSON format required for GitHub Pages hosting.
```bash
node tojson.js
```
--------------------------------
### Generate Schema from JSON
Source: https://github.com/discourse/discourse_api_docs/blob/main/README.md
Converts a raw JSON response into a YAML schema file.
```bash
node toschema.js