-
Notifications
You must be signed in to change notification settings - Fork 2
chore: Add required to config files to remove issues #1698
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
base: main
Are you sure you want to change the base?
Conversation
| public string? MeshApiBaseUrl { get; set; } | ||
| [Required] | ||
| public string BSSMailBox { get; set; } | ||
| public required string BSSMailBox { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have we made sure that the required decorator is the same as the required tag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is the decorator checks in runtime and the keyword checks at compile time.
I think its safer if we check at compile time but keeping the decorator allows for nice config error messages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We get the config at runtime though? Or have I misunderstood something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think by having the required keyword it makes it easier and quicker to debug as functions will fail the healthchecks if they don't contain all the config
| { | ||
| DemographicURI = "DemographicURI", | ||
| AllowDeleteRecords = allowDeleteRecords, | ||
| ParticipantManagementTopic = "ParticipantManagementTopic" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean this looks legitimate but, why are we adding all these here? Why were they not here before? Where have they come from? ahaha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As on previous comment, the required keyword is compile time these values need to be set even though they are not used
tests/UnitTests/CaasIntegrationTests/receiveCaasFileTest/ReceiveCaasFileTests.cs
Show resolved
Hide resolved
tests/UnitTests/CallDurableDemographicFuncTests/CallDurableDemograpghicFunc.cs
Show resolved
Hide resolved
|



Description
Added required tag to variables if they contained the data annotation
Context
Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.