diff --git a/src/ninja_bear/base/generator_base.py b/src/ninja_bear/base/generator_base.py index a4b2a19..f4248d1 100644 --- a/src/ninja_bear/base/generator_base.py +++ b/src/ninja_bear/base/generator_base.py @@ -131,13 +131,16 @@ def dump(self) -> str: # Remove hidden properties. properties_copy = [property for property in properties_copy if not property.hidden] + # If not naming conventation has been provided, use camel-case as default. + if not self._naming_conventions.properties_naming_convention: + self._naming_conventions.properties_naming_convention = NamingConventionType.CAMEL_CASE + # Update property names according to naming convention. - if self._naming_conventions.properties_naming_convention: - for property in properties_copy: - property.name = NameConverter.convert( - property.name, - self._naming_conventions.properties_naming_convention - ) + for property in properties_copy: + property.name = NameConverter.convert( + property.name, + self._naming_conventions.properties_naming_convention + ) s = self._dump(DumpInfo( self._type_name,