File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414- Add support for handling ` parameters ` defined on ` path items ` (common
1515 parameters for all operation under a certain path).
1616 Refer to the [ ` Path Item ` specification] ( https://swagger.io/specification/#path-item-object ) .
17+ - Fix bug happening when a parameter has a non-str ` name ` property.
1718
1819## [ 1.1.0] - 2025-01-18
1920
Original file line number Diff line number Diff line change @@ -410,6 +410,11 @@ def _resolve_opt_ref(self, obj):
410410 return self .resolve_reference (obj )
411411 return obj
412412
413+ def _lower (self , obj ):
414+ if isinstance (obj , str ):
415+ return obj .lower ()
416+ return str (obj )
417+
413418 def get_parameters (self , operation ) -> List [dict ]:
414419 """
415420 Returns a list of objects describing the input parameters for a given operation.
@@ -424,7 +429,7 @@ def get_parameters(self, operation) -> List[dict]:
424429 param
425430 for param in sorted (
426431 parameters ,
427- key = lambda x : x ["name" ]. lower ( ) if (x and "name" in x ) else "" ,
432+ key = lambda x : self . _lower ( x ["name" ]) if (x and "name" in x ) else "" ,
428433 )
429434 if param
430435 ]
You can’t perform that action at this time.
0 commit comments