jsonforms icon indicating copy to clipboard operation
jsonforms copied to clipboard

Support snake_case for labels derived from properties

Open KES777 opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe.

There two popular naming convection exists: CamelCase and snake_case.

For CamelCase you have: image

But in my case property names come from database column names, where snake_case is used.

Describe the solution you'd like

Please apply your rule also for snake_case. I expect Snake Case.

Describe alternatives you've considered

Or, probably, allow to configure a callback, which could be used to generate labels.

Framework

No response

RendererSet

No response

Additional context

No response

KES777 avatar May 04 '23 23:05 KES777

Hi @KES777 , thanks for the report. I renamed the issue to more accurately reflect its goal.

We will not implement this in the near future but we would gladly accept a contribution implementing this as long as it doesn't conflict with the current solution :)

lucas-koehler avatar May 08 '23 13:05 lucas-koehler

As a workaround I would like to recommend to also set the title attribute in your JSON Schema to render the UI as expected by you. This could be done in a preprocessing step before handing the JSON Schema over to JSON Forms.

Alternatively you can use the i18n support to override the labels in any way you like.

sdirix avatar May 12 '23 15:05 sdirix