@@ -24,20 +24,20 @@ export default class APIElementImporter {
2424 // FIXME: Minim is treating object (array of member) as array
2525 const meta = api . attributes . get ( 'metadata' ) ;
2626 if ( meta ) {
27- for ( const member of meta ) {
27+ meta . forEach ( ( member ) => {
2828 if ( member . key . content === 'HOST' ) {
2929 this . base = member . value . toValue ( ) ;
3030 }
31- }
31+ } ) ;
3232 }
3333
34- for ( const resourceGroup of api . resourceGroups ) {
34+ api . resourceGroups . forEach ( ( resourceGroup ) => {
3535 this . importResourceGroup ( resourceGroup ) ;
36- }
36+ } ) ;
3737
38- for ( const resource of api . resources ) {
38+ api . resources . forEach ( ( resource ) => {
3939 this . importResource ( resource ) ;
40- }
40+ } ) ;
4141 }
4242
4343 importResourceGroup ( resourceGroup ) {
@@ -46,14 +46,14 @@ export default class APIElementImporter {
4646 if ( resourceGroup . title ) {
4747 const group = this . context . createRequestGroup ( coalesceElementValue ( resourceGroup . title , 'Resource Group' ) ) ;
4848
49- for ( const resource of resourceGroup . resources ) {
49+ resourceGroup . resources . forEach ( ( resource ) => {
5050 const item = this . importResource ( resource ) ;
5151 group . appendChild ( item ) ;
52- }
52+ } ) ;
5353 } else {
54- for ( const resource of resourceGroup . resources ) {
54+ resourceGroup . resources . forEach ( ( resource ) => {
5555 this . importResource ( resource ) ;
56- }
56+ } ) ;
5757 }
5858 }
5959
@@ -62,10 +62,10 @@ export default class APIElementImporter {
6262
6363 const group = this . context . createRequestGroup ( coalesceElementValue ( resource . title , 'Resource' ) ) ;
6464
65- for ( const transition of resource . transitions ) {
65+ resource . transitions . forEach ( ( transition ) => {
6666 const item = this . importTransition ( resource , transition ) ;
6767 group . appendChild ( item ) ;
68- }
68+ } ) ;
6969
7070 return group ;
7171 }
@@ -80,10 +80,10 @@ export default class APIElementImporter {
8080
8181 const group = this . context . createRequestGroup ( coalesceElementValue ( transition . title , 'Transition' ) ) ;
8282
83- for ( const transaction of transition . transactions ) {
83+ transition . transactions . forEach ( ( transaction ) => {
8484 const item = this . importTransaction ( resource , transition , transaction ) ;
8585 group . appendChild ( item ) ;
86- }
86+ } ) ;
8787
8888 return group ;
8989 }
@@ -108,9 +108,9 @@ export default class APIElementImporter {
108108 const pawRequest = this . context . createRequest ( coalesceElementValue ( request . title , transition . title , 'Transaction' ) , request . method . toValue ( ) , url ) ;
109109
110110 if ( request . headers ) {
111- for ( const header of request . headers ) {
111+ request . headers . forEach ( ( header ) => {
112112 pawRequest . setHeader ( header . key . toValue ( ) , header . value . toValue ( ) ) ;
113- }
113+ } ) ;
114114 }
115115
116116 if ( request . messageBody ) {
0 commit comments