eclipsesource / jsonforms

Customizable JSON Schema-based forms with React, Angular and Vue support out of the box.
http://jsonforms.io
Other
2.18k stars 361 forks source link

Support snake_case for labels derived from properties #2135

Open KES777 opened 1 year ago

KES777 commented 1 year ago

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

lucas-koehler commented 1 year ago

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 :)

sdirix commented 1 year ago

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.