File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ async function isGenerationConditionMet (
4242 return conditionalSubjectGeneration (
4343 asyncapiDocument ,
4444 templateConfig ,
45- matchedConditionPath
45+ matchedConditionPath ,
46+ templateParams
4647 ) ;
4748 }
4849 return conditionalParameterGeneration ( templateConfig , matchedConditionPath , templateParams ) ;
@@ -111,9 +112,7 @@ async function conditionalSubjectGeneration (
111112 const server = templateParams . server && asyncapiDocument . servers ( ) . get ( templateParams . server ) ;
112113 const source = jmespath . search ( {
113114 ...asyncapiDocument . json ( ) ,
114- ...{
115- server : server ? server . json ( ) : undefined ,
116- } ,
115+ server : server ? server . json ( ) : undefined ,
117116 } , subject ) ;
118117
119118 if ( ! source ) {
@@ -140,7 +139,6 @@ async function validateStatus(
140139 if ( ! validation ) {
141140 return false ;
142141 }
143-
144142 const isValid = validation ( argument ) ;
145143
146144 if ( ! isValid ) {
@@ -151,7 +149,6 @@ async function validateStatus(
151149 // TODO: https://github.com/asyncapi/generator/issues/1553
152150 log . debug ( logMessage . conditionalFilesMatched ( matchedConditionPath ) ) ;
153151 }
154-
155152 return false ;
156153 }
157154 return true ;
You can’t perform that action at this time.
0 commit comments