File tree Expand file tree Collapse file tree
asyncapi-typescript-plugin/src/transform Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -330,6 +330,19 @@ function transformParameters(
330330 ) ;
331331 }
332332
333+ if ( typeof param . default === 'string' ) {
334+ members . push (
335+ ts . factory . createPropertySignature (
336+ tsModifiers ( { readonly : ctx . immutable } ) ,
337+ tsPropertyIndex ( 'default' ) ,
338+ undefined ,
339+ ts . factory . createLiteralTypeNode (
340+ ts . factory . createStringLiteral ( param . default )
341+ )
342+ )
343+ ) ;
344+ }
345+
333346 if ( Array . isArray ( param . enum ) && param . enum . length > 0 ) {
334347 members . push (
335348 ts . factory . createPropertySignature (
Original file line number Diff line number Diff line change 7373 " streetlight-1" ,
7474 " streetlight-2"
7575 ],
76+ "default" : " streetlight-1" ,
7677 "location" : " $message.payload#/item/id"
7778 }
7879 },
828829 " streetlight-1" ,
829830 " streetlight-2"
830831 ],
832+ "default" : " streetlight-1" ,
831833 "location" : " $message.payload#/item/id"
832834 }
833835 },
You can’t perform that action at this time.
0 commit comments