From 7f382468eeaefa28bc5cb4a95763a0c14889bda7 Mon Sep 17 00:00:00 2001 From: Robin Munn Date: Tue, 7 Jan 2025 15:19:07 -0500 Subject: [PATCH] Don't check part of speech GUIDs yet As long as senses only have a PartOfSpeechId in them, it's hard to check that property statelessly because we need to look up the PartOfSpeech in order to determine whether it's predefined (and thus whether its GUID needs to match one of the canonical GUIDs). For now, we'll skip checking part of speech GUIDs until senses have an actual PartOfSpeech reference. --- backend/FwLite/MiniLcm/Validators/SenseValidator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/FwLite/MiniLcm/Validators/SenseValidator.cs b/backend/FwLite/MiniLcm/Validators/SenseValidator.cs index 682e7db58..f65d2807a 100644 --- a/backend/FwLite/MiniLcm/Validators/SenseValidator.cs +++ b/backend/FwLite/MiniLcm/Validators/SenseValidator.cs @@ -11,7 +11,7 @@ public SenseValidator() RuleFor(s => s.Definition).NoEmptyValues(); RuleFor(s => s.Gloss).NoEmptyValues(); // RuleFor(s => s.PartOfSpeech).Empty(); // TODO: Comment out if we're not yet ready to move away from strings - RuleFor(s => s.PartOfSpeechId).SetValidator(new PartOfSpeechIdValidator()); + // RuleFor(s => s.PartOfSpeechId).SetValidator(new PartOfSpeechIdValidator()); // Can't do this statelessly, as we'd need a full PartOfSpeech object to check if it's predefined or not RuleForEach(s => s.SemanticDomains).SetValidator(new SemanticDomainValidator()); RuleForEach(s => s.ExampleSentences).SetValidator(sense => new ExampleSentenceValidator(sense)); }