File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -421,7 +421,7 @@ def test_31_vs_30_feature_comparison(self):
421421 )
422422
423423 # Convert to 3.0 spec and test with 3.0 parser
424- spec_30_no_const = {
424+ spec_30_no_const = {
425425 "openapi" : "3.0.3" ,
426426 "info" : {"title" : "Test 3.0" , "version" : "1.0.0" },
427427 "paths" : {},
@@ -435,11 +435,10 @@ def test_31_vs_30_feature_comparison(self):
435435 },
436436 }
437437
438- from openapi_python_generator .parsers import parse_openapi_30
438+ from openapi_python_generator .parsers import parse_openapi_30
439439
440- parsed_30 = parse_openapi_30 (spec_30_no_const )
440+ parsed_30 = parse_openapi_30 (spec_30_no_const )
441441
442- # In 3.0, const should either not exist or be ignored
443- test_schema_30 = parsed_30 .components .schemas ["Test" ]
444- # The 3.0 parser might ignore unknown fields or handle them differently
445- # This is expected behavior
442+ # In 3.0, const should either not exist or be ignored; ensure schema parses
443+ _ = parsed_30 .components .schemas ["Test" ] # noqa: F841
444+ # 3.0 parser may ignore 3.1-only fields like const (expected)
You can’t perform that action at this time.
0 commit comments