kontent-ai / model-generator-js

MIT License
13 stars 9 forks source link

Abstract Content Type Snippets #25

Closed WoodyWoodsta closed 2 years ago

WoodyWoodsta commented 2 years ago

Motivation

At the moment, content type snippets are just flattened into the model types. This defeats the purpose of the single point of truth provided by the snippet functionality, and it would make obvious sense to generate separate types for the content snippets, and have the model types extend from them.

Proposed solution

See above.

P.S. perhaps I've missed this functionality?

WoodyWoodsta commented 2 years ago

Apologies, I did not catch this closed issue: #24

WoodyWoodsta commented 2 years ago

In fact, I'll re-open it again, as even though content-type snippets are generated, they are not abstracted as above :)

Enngage commented 2 years ago

@WoodyWoodsta I've split the content type snippets and released an update :-) Thanks for the idea! If you can test it and let me know if that works for you, that would be great.

WoodyWoodsta commented 2 years ago

@Enngage Unfortunately I'm no longer working with Kontent, so will not be able to test.