Dynamic URL, Model ,View generation based on JSON schema

108 views
Skip to first unread message

Madhu Suthanan

unread,
Aug 26, 2021, 3:52:48 AM8/26/21
to Django REST framework
Hello All,

I am new to DRF,  I have query on following 
We have a JSON schema from which we need to expose an endpoint form a running  application.
ex: JSONSchema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "endpoint_name": { "type": "string" }, "methods": { "type": "array", "items": [ { "type": "string" }, { "type": "string" }, { "type": "string" }, { "type": "string" } ] }, "data": { "type": "object", "properties": { "name": { "type": "string" }, "id": { "type": "integer" } }, "required": [ "name", "id" ] } }, "required": [ "endpoint_name", "methods", "data" ] }
Questions
1. Is there a way to dynamically add an endpoint?
2. Is there a way to generate model from jsonschema?

Thanks in advance 

Reply all
Reply to author
Forward
0 new messages