Open guibranco opened 1 day ago
Click the checkbox below to generate a PR!
@guibranco, You have 3 requests left in this cycle which refreshes on 2024-11-21 10:07:38+00:00. If you have any questions or concerns, please contact us at info@gitauto.ai.
Hey, I'm a bit lost here! Not sure which file I should be fixing. Could you give me a bit more to go on? Maybe add some details to the issue or drop a comment with some extra hints? Thanks!
Have feedback or need help? Feel free to email info@gitauto.ai.
Feature Request: Add Entity Validation and Testing
Description
Implement a validator for entities in the Sankhya-SDK-dotnet repository to ensure compliance with the following constraints:
Entity Class Requirements:
EntityAttribute
specifying the entity name (mapping to the Sankhya service entity).IEntity
interface.IEquatable
interface must be implemented.Property Constraints:
EntityElementAttribute
EntityIgnoreAttribute
EntityReferenceAttribute
EntityElementAttribute
, a correspondingShouldSerialize{PropertyName}
method must exist. This method (with abool
return type) determines if the property has been modified and needs serialization in the HTTP request payload.Feature Scope
Create a validator that:
EntityAttribute
or implementingIEntity
.Integration:
Deliverables
Example Entity Class
Below is an example of a valid entity class that adheres to the described rules:
Example Validator Code
Here is an example implementation for the validator: