Do you want to contribute to the official API documentation at https://docs.discourse.org/?
This guide will explain step by step how to do it.
You must have a Discourse development installation.
If you don’t have one, follow the guide that suits your environment: Docs - Discourse Meta
We’ll assume your Discourse development install is inside your home directory
From your home directory, clone https://github.com/discourse/discourse_api_docs :
git clone https://github.com/discourse/discourse_api_docs
You should now have discourse and discourse_api_docs folders side by side:
You must edit the documentation directly from
After editing the documentation files, run the following command from
bin/rake rswag:specs:swaggerize && cp openapi/openapi.yaml ~/discourse_api_docs/openapi.yml
The documentation will be generated using rswag and copied into
To view your updated documentation, run these commands from
npm install node server.js
Browse to http://localhost:3001 to see the pretty docs.
If everything looks good, create a pull request from the discourse/discourse repository (not the Discourse API Docs repository ).
See the folder on Github: https://github.com/discourse/discourse/tree/main/spec/requests/api ↩︎