A Rest API to validate input request data.
- Framework - Django Rest Framework (GenericAPIView and serializers are used)
- Python - version 3.8.3
# clone the repository to your local machine
$ git clone https://github.com/pawan1210/django-validator.git
# navigate to the project's directory and install all the relevant dependencies
$ cd django-validator
# Run
$ docker-compose up -d --build
# Visit http://localhost:8000/ in your browser
# clone the repository to your local machine
$ git clone https://github.com/pawan1210/django-validator.git
# navigate to the project's directory and install all the relevant dev-dependencies
$ cd django-validator
# install dependencies
$ pip install -r requirements.txt
# Start application
$ python manage.py runserver
# Visit http://127.0.0.1:8000/ in your browser
REQUEST METHODS | ENDPOINTS | |
---|---|---|
POST | /validate/finite-values-entity | |
POST | /validate/numeric-entity |
- Either supported_values or values is empty then filled and partially_filled attributes will be false.
- Constraint for numeric entity supports [">=","<=",">","<","=="] operators.
- Constraint can be of 2 types - "x>=5 and x<=6" and "x>=5". Meaning it can contain 1 or 2 statements. The function can be made to support n number of statements also with some tweaks.