2021.4 #19

Merged
edraft merged 237 commits from 2021.4 into master 2021-04-01 10:13:33 +02:00
3 changed files with 12 additions and 12 deletions
Showing only changes of commit 8a95c03038 - Show all commits

View File

@ -219,7 +219,7 @@ class Configuration(ConfigurationABC):
config_from_file = self._load_json_file(file_path, output)
for sub in ConfigurationModelABC.__subclasses__():
for key, value in config_from_file.items():
if sub.__name__ == key:
if sub.__name__ == key or sub.__name__.replace('Settings', '') == key:
configuration = sub()
configuration.from_dict(value)
self.add_configuration(sub, configuration)

View File

@ -29,10 +29,6 @@ class Generate(CommandABC):
"Upper": "Class",
"Template": ClassTemplate
},
"configmodel": {
"Upper": "Settings",
"Template": ConfigModelTemplate
},
"enum": {
"Upper": "Enum",
"Template": EnumTemplate
@ -40,6 +36,10 @@ class Generate(CommandABC):
"service": {
"Upper": "Service",
"Template": ServiceTemplate
},
"settings": {
"Upper": "Settings",
"Template": ConfigModelTemplate
}
}
@ -51,11 +51,11 @@ class Generate(CommandABC):
Console.error(message)
schematics = [
['abc (a|A)'],
['class (c|C)'],
['configmodel (cm|CM)'],
['enum (e|E)'],
['service (s|S)'],
'abc (a|A)',
'class (c|C)',
'enum (e|E)',
'service (s|S)',
'settings (st|ST)'
]
Console.write_line('Available Schematics:')
for name in schematics:

View File

@ -46,9 +46,9 @@ class Startup(StartupABC):
self._configuration.add_console_argument(ConsoleArgument('', 'generate', ['g', 'G'], '', [
ConsoleArgument('', 'abc', ['a', 'A'], ' '),
ConsoleArgument('', 'class', ['c', 'C'], ' '),
ConsoleArgument('', 'configmodel', ['cm', 'CM'], ' '),
ConsoleArgument('', 'enum', ['e', 'E'], ' '),
ConsoleArgument('', 'service', ['s', 'S'], ' ')
ConsoleArgument('', 'service', ['s', 'S'], ' '),
ConsoleArgument('', 'settings', ['st', 'ST'], ' ')
]))
self._configuration.add_console_argument(ConsoleArgument('', 'help', ['h', 'H'], ''))
self._configuration.add_console_argument(ConsoleArgument('', 'new', ['n', 'N'], '', [