json-schema-codegen icon indicating copy to clipboard operation
json-schema-codegen copied to clipboard

OneOf misimplemented

Open sztanko opened this issue 6 years ago • 0 comments

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "one_of_fail",

  "properties": {
    "hosts": {
      "oneOf": [
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        {
          "type": "string"
        }
      ]
    }
  }
}

Fails with:

    property_type = property_["type"]
KeyError: 'type'

If we add type to it, it still fails, as it expects $ref in the oneOf items.

sztanko avatar Mar 16 '19 23:03 sztanko