File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,8 @@ class ApiGenerator extends Generator
138
138
* @var array Map for custom dbModels
139
139
* @example
140
140
* 'dbModel' => [
141
- * 'scenarioDefaultDescription' => " Scenario {name}", @see DbModel::$scenarioDefaultDescription
141
+ * AcceptedInputs: {scenarioName}, {modelName}.
142
+ * 'scenarioDefaultDescription' => " Scenario {scenarioName}", @see DbModel::$scenarioDefaultDescription
142
143
* ]
143
144
*/
144
145
public $ dbModel = [];
Original file line number Diff line number Diff line change @@ -113,7 +113,8 @@ class Config extends BaseObject
113
113
* @var array Map for custom dbModels
114
114
* @example
115
115
* 'dbModel' => [
116
- * 'scenarioDefaultDescription' => " Scenario {name}", @see DbModel::$scenarioDefaultDescription
116
+ * AcceptedInputs: {scenarioName}, {modelName}.
117
+ * 'scenarioDefaultDescription' => " Scenario {scenarioName}", @see DbModel::$scenarioDefaultDescription
117
118
* ]
118
119
*/
119
120
public $ dbModel = [];
Original file line number Diff line number Diff line change @@ -90,9 +90,10 @@ class DbModel extends BaseObject
90
90
/**
91
91
* @var string
92
92
* 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
+ * You can use the {scenarioName} attribute from the schema for the YAML model.
94
+ * You can use the {modelName}.
94
95
*/
95
- public string $ scenarioDefaultDescription = " Scenario {name } " ;
96
+ public string $ scenarioDefaultDescription = " Scenario {scenarioName } " ;
96
97
97
98
public function getTableAlias ():string
98
99
{
@@ -237,8 +238,13 @@ private function getScenariosByOpenapiSchema(): array
237
238
$ scenarios [$ key ]['description ' ] = FormatHelper::getFormattedDescription (
238
239
!empty ($ scenario ['description ' ]) ?
239
240
$ scenario ['description ' ]
240
- : str_replace ('{name} ' , $ scenario ['name ' ], $ this ->scenarioDefaultDescription
241
- ),
241
+ : str_replace ([
242
+ '{scenarioName} ' ,
243
+ '{modelName} ' ,
244
+ ], [
245
+ $ scenario ['name ' ],
246
+ $ this ->name ,
247
+ ], $ this ->scenarioDefaultDescription ),
242
248
5 );
243
249
}
244
250
You can’t perform that action at this time.
0 commit comments