Replies: 1 comment
-
You might want to post the solution as a separate message and mark it as answer. It will flag the question as "answered" in the list, making it clearer to others that there is a solution 😉 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I see that when DRF is enabled, this appears in base.py:
I'm able to access the page at http://localhost:3000/api/docs/# when logged in as an admin, even though I didn't see this referenced in the docs anywhere (I found it via #3593 (comment))
Does anyone know if there's an easy way to export the API docs so they appear as part of the Sphynx docs, or if one can export the OpenAPI schema for generating a documentation site outside of Sphynx? I already tried
docker-compose -f local.yml run --rm docs make apidocs
and thendocker-compose -f local.yml up docs
, but I didn't see any included API documentation.I do see the Take it for a spin section of drf-spectacular says one can generate your schema with
./manage.py spectacular --color --file schema.yml
...
Actually, I just figured this out:
docker-compose -f local.yml run --rm django python manage.py spectacular --color --file schema.yml
will generate aschema.yml
that's an OpenAPI schema. Hope this helps someone else!Beta Was this translation helpful? Give feedback.
All reactions