microsoft / dtdl-model-generator

A library used for generating C# classes from DTDL interfaces.
MIT License
13 stars 16 forks source link

Fix Model Conversion #35

Open Sefriol opened 11 months ago

Sefriol commented 11 months ago
jarz commented 11 months ago

@ms-mikeb: I can't recall the (historic?) reason for the SourceValue behavior with enum comments. Thoughts?

Sefriol commented 11 months ago

@jarz Any updates? I can iterate this if need be.

ms-mikeb commented 10 months ago

@ms-mikeb: I can't recall the (historic?) reason for the SourceValue behavior with enum comments. Thoughts?

Sorry for the late reply on this. We have an old system we needed to be able to map the value we're storing in the Comment field to an attribute that's added to the model in C#. I recognize this behavior wasn't documented well, nor is it intuitive. I'll need to see what alternatives we can look at for managing this so we can retire this behavior.

ms-mikeb commented 10 months ago

@jarz Any updates? I can iterate this if need be.

@Sefriol

I would say, let's make an issue to track the Comment, and just focus the PR on the casing support.

Sefriol commented 10 months ago

Changed the logic so that Comment takes precedence over enumvalue. There were some other issues with enum property names that I wanted to fix as well, so I kept those.