forked from loafle/openapi-generator-original
[python] Add option to return None instead of raising exception when accessing unset attribute (#7784)
* add option to return None instead of raising exception when accessing unset attribute * update python samples * reimplement getattr using getitem or get depending on attrNoneIfUnset * move getattr and setattr to respective templates * update docstrings, def get/setattr methods to have docstrings in them, use __dict__ to avoid recursion issues * revert required_properties change * add manual tests for .get method
This commit is contained in:
@@ -14,6 +14,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|packageUrl|python package URL.| |null|
|
||||
|packageVersion|python package version.| |1.0.0|
|
||||
|projectName|python project name in setup.py (e.g. petstore-api).| |null|
|
||||
|pythonAttrNoneIfUnset|when accessing unset attribute, return `None` instead of raising `ApiAttributeError`| |false|
|
||||
|recursionLimit|Set the recursion limit. If not set, use the system default value.| |null|
|
||||
|useNose|use the nose test framework| |false|
|
||||
|
||||
|
||||
Reference in New Issue
Block a user