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