We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 10212d5 commit 4b492b8Copy full SHA for 4b492b8
tests/test_parser/test_responses.py
@@ -31,6 +31,29 @@ def test_response_from_data_no_content(any_property_factory):
31
)
32
33
34
+def test_response_from_data_reference(any_property_factory):
35
+ from openapi_python_client.parser.responses import Response, response_from_data
36
+
37
+ response, schemas = response_from_data(
38
+ status_code=200,
39
+ data=oai.Reference.construct(),
40
+ schemas=Schemas(),
41
+ parent_name="parent",
42
+ config=MagicMock(),
43
+ )
44
45
+ assert response == Response(
46
47
+ prop=any_property_factory(
48
+ name="response_200",
49
+ default=None,
50
+ nullable=False,
51
+ required=True,
52
+ ),
53
+ source="None",
54
55
56
57
def test_response_from_data_unsupported_content_type():
58
from openapi_python_client.parser.responses import response_from_data
59
0 commit comments