Since OpenAPI 3.1, the type schema field can now be a list, for example:
"type": ["string", "null"]
Would mean that the schema can be a string or null.
Redoc verifies that when "overriding" a property with allOf, the type is identical (see here). But the check is done using ===, which does not work well for lists, hence I'm getting this error:
Incompatible types in allOf at "/properties/error/properties/code": "string,null" and "string,null"
Expected behavior
If both types in the parent and child schema are ["string", "null"], there shouldn't be an error.
The solution is probably to modify the comparison to be smarter than a simple ===.