File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,20 +36,29 @@ private static string ParseConfigNode(YamlNode node)
3636 if ( testClassName . Contains ( "Legacy" ) )
3737 testClassName = testClassName . Replace ( "Legacy" , "" ) ;
3838
39+ var optionsStr = StringifyOptions ( codegenObj ) ;
40+
3941 return $ """
4042 <details>
4143 <summary>{ projectName . Replace ( "Example" , "" ) } </summary>
4244
4345 ## Engine `{ item [ "engine" ] } `: [{ projectName } ]({ outputDirectory } )
44- ### [Schema]({ item [ "schema" ] [ 0 ] } ) | [Queries]({ item [ "queries" ] [ 0 ] } ) | [End2End Test](end2end/{ testProject } /{ testClassName } .cs)
46+ ### [Schema]({ GetYamlFirstValue ( item [ "schema" ] ) } ) | [Queries]({ GetYamlFirstValue ( item [ "queries" ] ) } ) | [End2End Test](end2end/{ testProject } /{ testClassName } .cs)
4547 ### Config
4648 ```yaml
47- { StringifyOptions ( codegenObj ) } ```
49+ { optionsStr } ```
4850
4951 </details>
5052 """ ;
5153 }
5254
55+ private static string GetYamlFirstValue ( YamlNode node )
56+ {
57+ return node is YamlSequenceNode sequence
58+ ? sequence [ 0 ] . ToString ( )
59+ : node . ToString ( ) ;
60+ }
61+
5362 private static string StringifyOptions ( YamlMappingNode codegenObj )
5463 {
5564 if ( ! codegenObj . Children . ContainsKey ( new YamlScalarNode ( "options" ) ) )
You can’t perform that action at this time.
0 commit comments