Commit 80ea44e 1 parent 0caacf8 commit 80ea44e Copy full SHA for 80ea44e
File tree 1 file changed +12
-5
lines changed
1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -731,11 +731,18 @@ def read_modules() -> Any:
731
731
]["required" ]
732
732
}
733
733
)
734
- q = data ["components" ]["requestBodies" ][requestbody_ref ]["content" ][
735
- "application/json"
736
- ][
737
- "schema"
738
- ] # pylint: disable=invalid-name
734
+ if "application/json" in data ["components" ]["requestBodies" ][requestbody_ref ]["content" ]:
735
+ q = data ["components" ]["requestBodies" ][requestbody_ref ]["content" ][
736
+ "application/json"
737
+ ][
738
+ "schema"
739
+ ] # pylint: disable=invalid-name
740
+ else :
741
+ q = data ["components" ]["requestBodies" ][requestbody_ref ]["content" ][
742
+ "application/x-ndjson"
743
+ ][
744
+ "schema"
745
+ ] # pylint: disable=invalid-name
739
746
if "description" in q :
740
747
body .update ({"description" : q ["description" ]})
741
748
if "x-serialize" in q :
You can’t perform that action at this time.
0 commit comments