Skip to main content

A Django app used to validate request and response objects for django apis.

Project description

Validator is a Django app used to validate request and response objects for django apis.

Quick start

  1. Add “validator” to your INSTALLED_APPS setting like this before your apps:

    INSTALLED_APPS = [
        ...
        'validator',
    ]
  2. Add “validator.middleware.Validator” to your MIDDLEWARE setting like this:

    MIDDLEWARE = [
        ...
        'validator.middleware.Validator',
        'django.middleware.common.CommonMiddleware',
        ...
    ]
  3. Add SCHEMA variable in settings.py, which gives the location of the schema.json file.

    SCHEMA = ‘ext_app/schema.json’

  4. Add DOCUMENTATION variable in settings.py, which gives the location of the DOC.md file to be generated.

    DOCUMENTATION = ‘ext_app/DOC.md’

  5. To generate api documentation from schema.json, run

    python3 manage.py gen_docs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-json-schema-validator-0.1.1.tar.gz (4.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page