This tool provides a user-friendly interface powered by Django for managing JSON schemas, validating JSON responses, and generating documentation. With features for adding, updating, and validating schemas, users can efficiently work with JSON data.
- Add Schema:
- Allow users to add a new JSON schema to the tool.
- Validate the added schema for correctness.
- Provide feedback on successful addition or errors in the new schema.
- Create Documentation (with Internal Schema Validation):
- Generate human-readable documentation from a selected JSON schema.
- Internally validate the provided schema to ensure its correctness.
- Display detailed error messages if the schema is invalid.
- Save documentation to a file or display it on the console.
- Update Schema:
- Enable users to update an existing JSON schema.
- Validate the updated schema for correctness.
- Allow operations such as adding, modifying, or removing properties and constraints.
- Provide feedback on the success of the update or errors in the updated schema.
Make sure python3.9 is installed. Check the version of the python installed using
python --version
Steps to get the application running:
- Clone the repository:
git clone https://github.com/prathamagrawal/SchemaParser.git cd SchemaParser
- Install requirements.txt
pip install -r requirements.txt
- Change the SQL Configuration
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME':'demo', 'USER':'demo', 'HOST':'demo', 'PASSWORD':'demo', 'PORT':demo, } }
- Make Migrations:
python manage.py makemigrations python manage.py migrate
- Collect the static files
python manage.py collectstatic
- Create Superuser
python manage.py createsuperuser
- Run the server
python manage.py runserver
A user can create a schema using the add schema option. Multiple properties can be added and removed. Customizations can be made for their respective datatypes and whether they are used or not.
The following schema can be downloaded as json:
{
"title": "employee database",
"description": "Information of all employees",
"properties": [
{
"propertyTitle": "Name",
"propertyDescription": "Name of the employee",
"propertyDataType": "str",
"propertyRequired": false
}
]
}
A user can select schema and upload a json file. The file would be validated against the json schema, if it passes it would convert it into a markdown file. If not, it would log the errors to the user.
A user can add or delete properties in a schema, and later the final updated schema can be viewed as well as download.
- Deployment using docker
- Using redis cluster to make less API calls
- Using Sessions