Closed musicinmybrain closed 1 year ago
The reason is the issue here https://github.com/p1c2u/openapi-spec-validator/issues/192
The issue was fixed and new openapi-spec-validator version 0.5.4
released hence closing
The steps in this report still produce test failures (albeit fewer of them) even with openapi-spec-validator 0.5.4.
============================================ short test summary info =============================================
FAILED tests/integration/validation/test_petstore.py::TestPetstore::test_post_tags_created_now - openapi_core.validation.request.exceptions.InvalidRequestBody: Request body error
FAILED tests/integration/validation/test_petstore.py::TestPetstore::test_post_tags_created_invalid_type - assert <class 'openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaFormatValue'> is InvalidSchemaValue
FAILED tests/unit/unmarshalling/test_unmarshal.py::TestOAS30SchemaUnmarshallerCall::test_string_format_datetime_invalid - Failed: DID NOT RAISE <class 'openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue'>
FAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_date_invalid[true] - Failed: DID NOT RAISE <class 'openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue'>
FAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_uuid_invalid[true0] - Failed: DID NOT RAISE <class 'openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue'>
FAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_datetime_invalid[true0] - Failed: DID NOT RAISE <class 'openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue'>
FAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_datetime_invalid[true1] - Failed: DID NOT RAISE <class 'openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue'>
FAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_datetime_invalid[1989-01-02] - Failed: DID NOT RAISE <class 'openapi_core.unmarshalling.schemas.exceptions.InvalidSchemaValue'>
FAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_datetime_strict_rfc3339[1989-01-02T00:00:00Z] - AttributeError: <module 'openapi_schema_validator._format' from '/home/ben/src/forks/openapi-core/_e/lib64/py...
FAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_datetime_strict_rfc3339[2018-01-02T23:59:59Z] - AttributeError: <module 'openapi_schema_validator._format' from '/home/ben/src/forks/openapi-core/_e/lib64/py...
FAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_datetime_isodate[1989-01-02T00:00:00Z] - AttributeError: <module 'openapi_schema_validator._format' from '/home/ben/src/forks/openapi-core/_e/lib64/py...
FAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_datetime_isodate[2018-01-02T23:59:59Z] - AttributeError: <module 'openapi_schema_validator._format' from '/home/ben/src/forks/openapi-core/_e/lib64/py...
======================= 12 failed, 762 passed, 5 xfailed, 2 xpassed, 842 warnings in 4.97s =======================
If it matters, the above output is from Python 3.11.1.
The steps in this report still produce test failures (albeit fewer of them) even with openapi-spec-validator 0.5.4.
I noticed that openapi-schema-validator 0.4.3 is not yet on PyPI. If I install it manually, I’m down to 7 failures:
=========================== short test summary info ============================
FAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_date_invalid[true]
FAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_uuid_invalid[true0]
FAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_datetime_invalid[true0]
FAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_datetime_strict_rfc3339[1989-01-02T00:00:00Z]
FAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_datetime_strict_rfc3339[2018-01-02T23:59:59Z]
FAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_datetime_isodate[1989-01-02T00:00:00Z]
FAILED tests/unit/unmarshalling/test_validate.py::TestSchemaValidate::test_string_format_datetime_isodate[2018-01-02T23:59:59Z]
====== 7 failed, 728 passed, 5 xfailed, 2 xpassed, 980 warnings in 2.02s =======
The tests pass.
Now:
(The full output is too long to paste here.)