File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,8 @@ class ApiGenerator extends Generator
138138 * @var array Map for custom dbModels
139139 * @example
140140 * 'dbModel' => [
141- * 'scenarioDefaultDescription' => " Scenario {name}", @see DbModel::$scenarioDefaultDescription
141+ * AcceptedInputs: {scenarioName}, {scenarioConst}, {modelName}.
142+ * 'scenarioDefaultDescription' => " Scenario {scenarioName}", @see DbModel::$scenarioDefaultDescription
142143 * ]
143144 */
144145 public $ dbModel = [];
Original file line number Diff line number Diff line change @@ -113,7 +113,8 @@ class Config extends BaseObject
113113 * @var array Map for custom dbModels
114114 * @example
115115 * 'dbModel' => [
116- * 'scenarioDefaultDescription' => " Scenario {name}", @see DbModel::$scenarioDefaultDescription
116+ * AcceptedInputs: {scenarioName}, {scenarioConst}, {modelName}.
117+ * 'scenarioDefaultDescription' => " Scenario {scenarioName}", @see DbModel::$scenarioDefaultDescription
117118 * ]
118119 */
119120 public $ dbModel = [];
Original file line number Diff line number Diff line change @@ -90,9 +90,9 @@ class DbModel extends BaseObject
9090 /**
9191 * @var string
9292 * Here, you can set your own default description for the scenario.
93- * You can use the {name} attribute from the schema for the YAML model .
93+ * AcceptedInputs: {scenarioName}, {scenarioConst}, {modelName} .
9494 */
95- public string $ scenarioDefaultDescription = " Scenario {name } " ;
95+ public string $ scenarioDefaultDescription = " Scenario {scenarioName } " ;
9696
9797 public function getTableAlias ():string
9898 {
@@ -237,8 +237,15 @@ private function getScenariosByOpenapiSchema(): array
237237 $ scenarios [$ key ]['description ' ] = FormatHelper::getFormattedDescription (
238238 !empty ($ scenario ['description ' ]) ?
239239 $ scenario ['description ' ]
240- : str_replace ('{name} ' , $ scenario ['name ' ], $ this ->scenarioDefaultDescription
241- ),
240+ : str_replace ([
241+ '{scenarioName} ' ,
242+ '{scenarioConst} ' ,
243+ '{modelName} ' ,
244+ ], [
245+ $ scenario ['name ' ],
246+ $ scenarios [$ key ]['const ' ],
247+ $ this ->name ,
248+ ], $ this ->scenarioDefaultDescription ),
242249 5 );
243250 }
244251
You can’t perform that action at this time.
0 commit comments