Okai tool field name capitalisation

Just a quick question really.

The fields in my old solution were snake_case to match the database I was interfacing with. However, when I’m renewing my solution to NET 10.0 and taking advantage of the new functionality, I’ve noticed the field names are generated as camel case.

Is there any way I can change this similar to when the configuration of the json serializer is altered?

Thanks for your time.

It’s not configurable.

If I had to map to existing Table and column names that didn’t match the convention I’d use @alias attributes:

@alias("my_table")
class MyTable {
    @alias("created_date")
    createdDate: Date
}

Alternatively you can register mappings in code when configuring your dialect:

services.AddOrmLite(options => options.UsePostgres(connString, dialect => {
    dialect.NamingStrategy.TableAliases["MyTable"] = "my_table";
    dialect.NamingStrategy.SchemaAliases["MySchema"] = "my_schema";
    dialect.NamingStrategy.ColumnAliases["MyColumn"] = "my_columnt";
}));

Otherwise I’m sure you could get claude code or other AI Assistant to write a script to convert all properties to your preferred case, that you could run after you use okai.

The issue I’m having is all the Angular code is using snake case and the DTOs are now all pascal case I think?

I’ll have a bit more of a play, thanks for the info.