[PJL-10221] handle some edge cases in OpenAPI v3.1 swagger generation #327
GitHub Actions / JUnit Report python3.10 marshmallow>3.18.0 flask=='2.2.*' werkzeug=='2.2.*'
failed
Oct 2, 2024 in 0s
134 tests run, 133 passed, 0 skipped, 1 failed.
Annotations
Check failure on line 1 in TestConverterRegistry
github-actions / JUnit Report python3.10 marshmallow>3.18.0 flask=='2.2.*' werkzeug=='2.2.*'
TestConverterRegistry.test_custom_dicts_openapi_v3
TypeError: OneOf.__init__() takes from 2 to 3 positional arguments but 4 were given
Raw output
self = <tests.swagger_generation.test_marshmallow_to_swagger.TestConverterRegistry testMethod=test_custom_dicts_openapi_v3>
def test_custom_dicts_openapi_v3(self):
for field, result in [
(
m.fields.Dict(),
{
"type": "object",
},
),
(
m.fields.Dict(
keys=m.fields.String(),
values=m.fields.Integer(),
dump_default={"a": 1},
),
{
"type": "object",
"additionalProperties": {"type": "integer"},
},
),
(
m.fields.Dict(
> keys=m.fields.String(validate=v.OneOf("a", "b", "c")),
values=m.fields.String(),
),
{
"type": "object",
"additionalProperties": {"type": "string"},
},
),
]:
E TypeError: OneOf.__init__() takes from 2 to 3 positional arguments but 4 were given
tests/swagger_generation/test_marshmallow_to_swagger.py:258: TypeError
Loading