-
Notifications
You must be signed in to change notification settings - Fork 68
API Code Review Checklist
Sumesh Punakkal Kariyil edited this page Apr 23, 2019
·
8 revisions
-
- Proper naming conventions followed on variables, classes, definitions etc.
Module names should be lowercase with underscores instead of spaces. (And should be valid module names for importing.)
Variable names and function/method names should also be lowercase with underscores to separate words.
Class names should be CamelCase (uppercase letter to start with, words run together, each starting with an uppercase letter).
Module constants should be all uppercase.
- Proper logging levels are used in the code
-
- Endpoints follows agreed pattern and organized around resources
- Conform to http semantics
- Proper filtering and pagination is provided for large amounts of data
-
- Resources is used for request payload processing, validations, response codes, messages etc.
- Service is used for business logic, 3rd party communication management. Maintains proper folder structure.
- Model is used for database models.
- Schemas is used for json schema
- Util contains commonly used utility functions, constants
-
- Unit test cases with happy and sad path for service, model (?) layers
- Endpoints test cases with happy and sad path for resources
- Mocking of services (mainly 3rd party dependencies) provided if applicable
- Postman collection tests provided for endpoints with happy path
-
- Proper code coverage for all the layers (percentage 80, 90 ?)
- Linting
-
- Alembic is used to manage database migration. Reference