-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adds drf spectacular * adds title and project description * adds documentation on api documentation * RRRRuff * added spectacular to dev deps * changed urls.py back * added "samfundet:schema" to schema urls * repair poetry.lock * removes alias for generating schema, deleted schema. * removes commend * moved spectacular url patterns
- Loading branch information
Showing
6 changed files
with
299 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# API docs | ||
|
||
API docs are generated by [drf-spectacular](https://drf-spectacular.readthedocs.io/en/latest/readme.html). | ||
|
||
API documentation is available as two different interfaces: | ||
|
||
[Swagger-UI](http://localhost:8000/schema/swagger-ui/#/) or [Redoc](http://localhost:8000/schema/redoc/) | ||
|
||
|
||
|
||
🐋 _When backend server is running_ | ||
|
||
## API schema file | ||
|
||
If you want a schema file for the API you can go to [http://localhost:8000/schema/](http://localhost:8000/schema/). | ||
|
||
A schema file will be downloaded which can be used for multiple purposes, like sharing API documentation, or to generate code for recreating or testing the API. | ||
|
||
> 💡 Note: You might encounter some error messages during this process. These errors are typically related to drf-spectacular not being able to parse certain views in views.py. However, the tool will still attempt to generate the documentation, though the results might not be fully comprehensive. |