-
-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add API documentation workflow #3281
Add API documentation workflow #3281
Conversation
…hema.yml command in the mathesar_service_dev container.
@varshadr is this PR ready for review? I'm assuming so, since it's not a draft. As such, I'm assigning it to @mathemancer to review. |
Not just yet @seancolsen, I'll update it to a draft until then. |
Done with it, assigned @mathemancer for review |
We're reprioritizing, and unfortunately we won't be continuing the documentation project. |
Fixes #3278
Technical details
This PR adds a new workflow to generate API documentation using Docker and Git Actions. The workflow is triggered on push event to the develop branch.
The workflow performs the following steps:
github-actions[bot]
spectacular
management command.Why this approach?
Additional notes:
mathesar_service_dev
Docker container to generate the API documentation. This container contains the dependencies (drf-spectacular
library) for generating the documentation../manage.py spectacular --color --file schema.yml
command to generate the API documentation. This command generates a YAML file containing the OpenAPI schema for the API.git diff --quiet schema.yml
command to check if the schema file has changed. This command returns a status code of 0 if the schema file has not changed, and a status code of 1 if the schema file has changed.git add schema.yml
&&git commit -m "Updated schema file"
command to commit the changes to the schema file.git push origin ${{ github.head_ref }}
command to push the changes to the remote branch.Checklist
Update index.md
).develop
branch of the repositoryvisible errors.
Developer Certificate of Origin
Developer Certificate of Origin