Skip to content

Angle2-agency/rest-api-example

Repository files navigation

API Example

This repository is the example of the REST API implementation.

  1. Tech stack
  2. Installation
  3. Linting
  4. Testing
  5. API documentation

Tech stack

Main stack

Testing and QA

Installation

Project provides Makefile with all the basic operations. To build release version from scratch run

RDB_FULL_BUILD=yes make build

To build development version

RDB_FULL_BUILD=yes RDB_ENVIRONMENT=dev make build

if virtual environment is already set just run

make build

For development you can setup required services in the docker container, which will setup postgres database and SMTP mailcatcher

docker-compose up -d

Copy config-dist.yml to config.yml and set the actual parameters

Run migration by running

make migrate

Run the uvicorn server

make start_server

Linting

To check code style and static types run

make linters

Before making commit please run

make precommit

You can set this action as a precommit hook

Testing

To run all tests suits run

make tests

To run specific test suit you can run

# unit tests
make unit_test

# functional (acceptance) tests
make functional_test

# integrational tests
make integrational_test

API documentation

  • Swagger Open API documentation.

Run the server

make start_server

And access [[http://localhost:8000/docs]]

  • DB schemas

You can find DBML schemas in the dbdocs folder Also you can check ORM table declarations in the src/mapping folder

About

REST API example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages