### 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 ``` ```bash node toschema.js responses/topics/topic_respones.json definitions/topics/topic_response.yml ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.