expobrain/json-schema-codegen

Object is not coerced

expobrain opened this issue · 0 comments

Defining a property as object with $ref doesn't coerce the data into the referenced object.

For instance:

"document": {
  "type": "object",
  "oneOf": [
    {
      "type": "object",
      "$ref": "#/definitions/NodeConfig"
    }
  ]
}

generates:

self.document: NodeConfig = data["document"]

instead of

self.document: NodeConfig = NodeConfig(data["document"])