Skip to content

Add Support for Generating Management Models using Codename References #192

@nkooman-bzs

Description

@nkooman-bzs

Motivation

Generated Management models are tightly coupled to an environment since they use ID references. Typically we find that we have multiple environments in our Kontent.ai projects. When creating tools that utilize the Management SDK is becomes difficult to manage n number of models based the number of environments present.

Proposed solution

  1. Create a new KontentElementCodenameAttribute in the Management SDK to reference fields using codenames instead of IDs.
  2. Update model generation to include a new app setting that controls whether to use KontentElementIdAttribute or KontentElementCodenameAttribute. By default the tool would use KontentElementIdAttribute to prevent breaking changes. Perhaps in a major release we could swap to using KontentElementCodenameAttribute as the default.

Additional context

N/A

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions