Open wsalembi opened 2 months ago
You have one incorrect assumption here.
The type
keyword does not support null
in OAS 3.0.x
You must use nullable
as an alternative
null is not supported as a type (see nullable for an alternative solution)
Otherwise, I agree you cannot force type: object
where any other primitive is a valid schema.
https://github.com/swagger-api/swagger-parser/commit/9a5cd1990b06374c75999288824dca83a2cef4e3 introduced the behavior that properties without type defined are implied of type object. I don't think this statement is true. The absence of type means it is any type (object, null, string, etc).
Example
When resolving the schema, the type of property
goo
cannot be set to type object.I removed the implication and it didn't break any other tests.