Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve nullability of Reference.cs properties #267

Open
kylejuliandev opened this issue Apr 30, 2024 · 1 comment
Open

Improve nullability of Reference.cs properties #267

kylejuliandev opened this issue Apr 30, 2024 · 1 comment
Assignees

Comments

@kylejuliandev
Copy link

kylejuliandev commented Apr 30, 2024

Description

The nullability of ExternalId and Codename on Reference.cs is shown as not null in the Visual Studio IDE, it would be great to decorate these two properties (see below) with the nullability operator like on Id.

public string Codename { get; private set; }

public string ExternalId { get; private set; }

If I create a Reference instance with one of the provided factory methods (e.g. ByCodename, ByExternalId) the nullability of the remaining properties is not clear. In the sample below ExternalId is null although it's not documented as such.

using Kontent.Ai.Management.Models.Shared;

var reference = Reference.ByCodename("hello-world");

Console.WriteLine(reference.ExternalId);

image

Possibly long term it would be cool to enable nullable reference types (https://devblogs.microsoft.com/dotnet/try-out-nullable-reference-types/) to help make working with the Management SDK safer 😃

Many thanks!

@pokornyd pokornyd self-assigned this May 13, 2024
@pokornyd
Copy link
Member

hello and thank you for the submission. I'll review the proposed changes and update you on the resolution/PR, thank you for your patience :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants