https://github.com/python-openapi/openapi-spec-validator/blob/master/openapi_spec_validator/resources/schemas/v3.0.0/schema.json#L1225 Should it be `anyOf` instead of `oneOf`. In my case validation fails, because `1` is looks like number or string: `x-my-prop: 1`. Actually schema should not care which value is there.