You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While generating a c# client with kiota version 1.21.0, I noticed that readonly properties are no longer readonly when using a backing store.
My readonly property was generated like this:
public double? AveragePriceGross { get; private set; }
After re-generating the client with a backing store, it now looks like this and I can set the property, even though it is marked as readonly in my api definition
public double? AveragePriceGross
{
get { return BackingStore?.Get<double?>("average_price_gross"); }
set { BackingStore?.Set("average_price_gross", value); }
}
I understand that with backing store enabled, one can always change the property by manually changing the value in the underlying store, but I think the behavior should be consistent and the generated properties should either always or never be readonly, independent of whether a backing store is used.
The text was updated successfully, but these errors were encountered:
While generating a c# client with kiota version 1.21.0, I noticed that readonly properties are no longer readonly when using a backing store.
My readonly property was generated like this:
public double? AveragePriceGross { get; private set; }
After re-generating the client with a backing store, it now looks like this and I can set the property, even though it is marked as readonly in my api definition
I understand that with backing store enabled, one can always change the property by manually changing the value in the underlying store, but I think the behavior should be consistent and the generated properties should either always or never be readonly, independent of whether a backing store is used.
The text was updated successfully, but these errors were encountered: