Description
When loading an OpenAPI 2 spec that is using discriminator in models, then the spec parsing fails with
failed to unmarshal property "definitions" (*map[string]*openapi3.SchemaRef): failed to unmarshal property "discriminator" (*openapi3.Discriminator): failed to unmarshal extension properties: json: cannot unmarshal string into Go value of type map[string]json.RawMessage ("type")
Example: https://gist.github.com/patrick246/e8b329144d228b4a1892946162868e50
This issue was encountered by someone before (#214), but worked around by mixing OpenAPI 3 parts into their OpenAPI 2 spec. As far as I can tell, this is because the library is using OpenAPI 3 data types, but the discriminator changed between 2 and 3:
OpenAPI 2 uses string, while OpenAPI 3 uses a discriminator object.