kontent-ai / model-generator-net

Kontent.ai .NET model generator.
https://www.nuget.org/packages/Kontent.Ai.ModelGenerator
MIT License
17 stars 19 forks source link

Content Type Snippets generate incorrect property names #43

Closed hades200082 closed 6 years ago

hades200082 commented 6 years ago

Example

I have a content type snippet called "Meta Data" with elements "Description" and "Title"

When the generator runs it creates the following properties on the generated models:

        public const string TitleCodename = "meta_data__title";
        public const string DescriptionCodename = "meta_data__description";
        public string MetaDataPageTitle { get; set; }
        public string MetaDataDescription { get; set; }

The problem is with the "code name" properties... their property names should also be prefixed. Otherwise if I had multiple snippets with a "Description" or "Title" field the property names will conflict.

JanLenoch commented 6 years ago

Fixed by #59 .