Commit 3b94fb2
committed
refactor: reduce cognitive complexity in additional OpenAPI methods
- Refactored _resolve_openapi_config method to reduce complexity from 17 to 15
- Split into 4 helper methods for better maintainability
- Improved separation of concerns for config resolution logic
- Refactored get_openapi_schema method in example file to reduce complexity from 23 to 15
- Split into 6 helper methods with clear responsibilities
- Enhanced readability and maintainability of schema fixing logic
- All OpenAPI tests continue to pass (220/220)
- Example functionality validated and working correctly1 parent 3093afe commit 3b94fb2
File tree
2 files changed
+75
-35
lines changed- aws_lambda_powertools/event_handler
- examples/event_handler
2 files changed
+75
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1812 | 1812 | | |
1813 | 1813 | | |
1814 | 1814 | | |
1815 | | - | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
1816 | 1827 | | |
1817 | 1828 | | |
1818 | 1829 | | |
1819 | 1830 | | |
1820 | | - | |
| 1831 | + | |
| 1832 | + | |
1821 | 1833 | | |
1822 | 1834 | | |
1823 | 1835 | | |
1824 | 1836 | | |
1825 | | - | |
| 1837 | + | |
| 1838 | + | |
1826 | 1839 | | |
1827 | 1840 | | |
1828 | 1841 | | |
1829 | 1842 | | |
1830 | | - | |
| 1843 | + | |
| 1844 | + | |
1831 | 1845 | | |
1832 | 1846 | | |
1833 | 1847 | | |
| |||
1842 | 1856 | | |
1843 | 1857 | | |
1844 | 1858 | | |
1845 | | - | |
1846 | | - | |
1847 | 1859 | | |
1848 | 1860 | | |
1849 | 1861 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 52 | + | |
78 | 53 | | |
79 | 54 | | |
80 | 55 | | |
81 | 56 | | |
82 | 57 | | |
83 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
84 | 115 | | |
85 | 116 | | |
86 | 117 | | |
| |||
98 | 129 | | |
99 | 130 | | |
100 | 131 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | 132 | | |
105 | 133 | | |
106 | 134 | | |
| |||
0 commit comments