@@ -83,8 +83,11 @@ def parse_component_properties(properties, required):
8383 if data .get ('readOnly' ):
8484 continue
8585
86- parameter = {'name' : name , 'type' : data .get ('type' , 'object' ),
87- 'description' : data .get ('title' , data .get ('description' , name .replace ('_' , ' ' ).capitalize ()))}
86+ parameter = {
87+ 'name' : name ,
88+ 'type' : data .get ('type' , 'object' ),
89+ 'description' : data .get ('title' , data .get ('description' , name .replace ('_' , ' ' ).capitalize ()))
90+ }
8891
8992 if name in required :
9093 parameter ['required' ] = True
@@ -124,8 +127,8 @@ def get_actions(spec):
124127 }
125128
126129 print (f'Processing { action_name } ...' )
127- ref = method_spec .get ('requestBody' , {}).get ('content' , {}). get ( 'application/json' , {}). get ( 'schema' ,
128- {}).get ('$ref' )
130+ content = method_spec .get ('requestBody' , {}).get ('content' , {})
131+ ref = content . get ( 'application/json' , {}). get ( 'schema' , {}).get ('$ref' )
129132
130133 if ref :
131134 ref_name = ref .split ('/' )[- 1 ]
@@ -172,7 +175,9 @@ def get_actions(spec):
172175 for detailed_get in deferred_detail_gets :
173176 list_action = actions .get (detailed_get )
174177 if list_action is None :
175- raise Exception ("Unable to find list action for deferred GET endpoint {}" .format (detailed_get ))
178+ raise Exception (
179+ "Unable to find list action for deferred GET endpoint {}" .format (detailed_get )
180+ )
176181
177182 return actions
178183
@@ -212,8 +217,17 @@ def main():
212217 Main entry point.
213218 """
214219 parser = argparse .ArgumentParser ()
215- parser .add_argument ('--host' , type = str , default = 'https://demo.netbox.dev' , help = 'NetBox hostname' )
216- parser .add_argument ('--no-verify-ssl' , action = 'store_false' , help = 'Disable SSL certificate verification' )
220+ parser .add_argument (
221+ '--host' ,
222+ type = str ,
223+ default = 'https://demo.netbox.dev' ,
224+ help = 'NetBox hostname'
225+ )
226+ parser .add_argument (
227+ '--skip-ssl' ,
228+ action = 'store_false' ,
229+ help = 'Disable SSL certificate verification'
230+ )
217231
218232 args = parser .parse_args ()
219233 host = str (args .host ).rstrip ('/' )
0 commit comments