Dart-ref property naming

I have this issue with one property on my model that I cannot rename, nor set an attribute on (backwards compatibility with other clients).
The property is called context but the generated code by dart-ref is using TypeContext context = _ctx; in each generated class. Thereby context is giving issues because it cannot be used.

Is there any other way to have this TypeContext context = _ctx have a less common name?

No it’s the only pre-defined property on the core servicestack-dart IConvertible interface, it can’t be changed.

How about changing the generated property name for dart reserved names and context? Like you do @event in c#?

Try adding it in:


FYI I’ve added “context” as a keyword which is available in the latest v5.9.1 that’s now available on MyGet.

Ok; note that the property generated is now Context (capital C).
What are the rules for replacing keywords in the dart generator? Maybe you can add an option that you can append something instead, like context_value where _value is the suffix?

It’s simply capitalizes the first char it as done in other generators, not making it any more complicated than that. The goal should be to avoid using them in your DTOs.