mirror of
https://github.com/HackSoftware/Django-Styleguide.git
synced 2025-02-12 01:20:51 +03:00
Add naming convention for APIs
This commit is contained in:
parent
8d3fb415de
commit
dd6ffdd50d
|
@ -363,6 +363,12 @@ General rules for an API is:
|
||||||
* Reuse serializers as little as possible
|
* Reuse serializers as little as possible
|
||||||
* If you need a nested serializer, use the `inline_serializer` util
|
* If you need a nested serializer, use the `inline_serializer` util
|
||||||
|
|
||||||
|
### Naming convention
|
||||||
|
|
||||||
|
For our APIs we use the following naming convention: `<Entity><Action>Api`.
|
||||||
|
|
||||||
|
Here are few examples: `UserCreateApi`, `UserSendResetPasswordApi`, `UserDeactivateApi`, etc.
|
||||||
|
|
||||||
### An example list API
|
### An example list API
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
|
Loading…
Reference in New Issue
Block a user