microsoft / PowerPlatform-DataverseModelBuilder

Code Replica for the Microsoft Power Platform Dataverse Model Builder and supporting nuget packages
MIT License
14 stars 7 forks source link

Camel casing should be used when combining words in Option Name Logic #14

Open daryllabar opened 10 months ago

daryllabar commented 10 months ago

Currently whitespacing and invalid C# variable characters are removed from labels to generate enum options from option set values.

This leads to some really weird casing and hard to read names:

image

I propose that these two changes:

  1. When removing whitespace, the next valid C# character is capitalized:
    1. So a label of "A healthcare provider advised me to stop (baby not gaining weight, medication, medical issue, etc)" would become AHealthcareProviderAdvisedMeToStopBabyNotGainingWeightMedicationMedicalIssueEtc. Currently generating Ahealthcareprovideradvisedmetostop_babynotgainingweightmedicationmedicalissueetc
  2. If a word in a label are all caps, the that they are camel cased:
    1. So a label of "XML / JSON / CSV / ETC" would become XmlJsonCsvEtc Currently Generating XMLJSONCSVETC
MattB-msft commented 9 months ago

@daryllabar please feel free to propose the fix, we will take a look.