Skip to content

Commit

Permalink
Capitalize field names in class generation
Browse files Browse the repository at this point in the history
Updated class generation logic to capitalize the first letter of each field name. This ensures consistency with common naming conventions in .NET, enhancing readability and maintainability of the generated classes.
  • Loading branch information
Nils Kleinert committed Oct 19, 2024
1 parent d39d7ad commit a97d11a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ program
const className = table.charAt(0).toUpperCase() + table.slice(1).toLowerCase();
const output = [`public class ${className} {`];
fields.forEach((element) => {
output.push(` public ${element.fieldType} ${element.fieldName} { get; set; }`);
output.push(` public ${element.fieldType} ${element.fieldName.charAt(0).toUpperCase() + element.fieldName.slice(1)} { get; set; }`);
});
output.push(`}`);

Expand Down

0 comments on commit a97d11a

Please sign in to comment.