File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ export class PythonExporter implements FormatExporter {
121121 }
122122 }
123123 }
124- return name ;
124+ return name . replaceAll ( "-" , "_" ) . replaceAll ( "." , "_" ) ;
125125 } ) ;
126126
127127 // custom conditional to check for request body kind
Original file line number Diff line number Diff line change @@ -222,6 +222,27 @@ resp1 = client.search(
222222 },
223223)
224224
225+ ` ,
226+ ) ;
227+ } ) ;
228+
229+ it ( "converts attribute with dashes or dots to python" , async ( ) => {
230+ expect (
231+ await convertRequests (
232+ `PUT /_security/settings {"security-profile": {}}
233+ PUT /_watcher/settings {"index.auto_expand_replicas":"0-4"}` ,
234+ "python" ,
235+ { } ,
236+ ) ,
237+ ) . toEqual (
238+ `resp = client.security.update_settings(
239+ security_profile={},
240+ )
241+
242+ resp1 = client.watcher.update_settings(
243+ index_auto_expand_replicas="0-4",
244+ )
245+
225246` ,
226247 ) ;
227248 } ) ;
You can’t perform that action at this time.
0 commit comments