Skip to main content

JSON Schema support for Django REST Framework

Project description

Version:
1.0.0
Source:

https://github.com/maykinmedia/drf-jsonschema-serializer

Keywords:

django, rest, jsonschema

Tests and PyPI publishing Coverage status Linting and code quality black Documentation Status

python-versions django-versions pypi-version

JSON Schema support for Django REST Framework

Overview

drf-jsonschema-serializer is a library built around Django REST Framework. It does the following:

  • Convert a DRF serializer into a JSON Schema.

  • Provides JSONSchemaField that can validate JSON data according to a JSON schema.

  • Provides a SerializerJSONField that can validate JSON data according to a serializer for a field.

This lets you use client-side form libraries such as react-jsonschema-form to generate a web form from a serializer. This way you can use the same schema for client-side form generation and validation as you use for REST service input validation.

See the documentation for getting started and usage examples.

Credits and roadmap

Many thanks to https://github.com/isprojects for the initial work on this library. As of September 2021, Maykin Media has taken up maintenance of this package after transferring it from isprojects. See the issues on Github for the roadmap.

See also CREDITS.txt for a full history of authorship.

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

drf-jsonschema-serializer-1.0.0.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file drf-jsonschema-serializer-1.0.0.tar.gz.

File metadata

File hashes

Hashes for drf-jsonschema-serializer-1.0.0.tar.gz
Algorithm Hash digest
SHA256 aa58d03deba5a936bc0b0dbca4b69ee902886b7a0be130797f1d5e741b92e42b
MD5 34ba9c00e28331a65a53f2609006969c
BLAKE2b-256 cf33d3b9e5132b9ae5702abd09abac3becea14c7314ba8baa095ff6bb68b9525

See more details on using hashes here.

File details

Details for the file drf_jsonschema_serializer-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for drf_jsonschema_serializer-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 06401c94f1a2610797a26c390b701504b90b6b44683932daccbc250ea2aad3b1
MD5 874ef8bc269858ea302b357708727d6e
BLAKE2b-256 a4128624870619cf1127d22df6732e887ccb2406d166a1c15ff13cccaf931714

See more details on using hashes here.

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