Feat/methods to access xsd#1668
Feat/methods to access xsd#1668MagnusNordboe wants to merge 3 commits intoAltinn:feat/methods-to-access-xsdfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ivarne
left a comment
There was a problem hiding this comment.
Ser bra ut. Har noen små kommentarer. I tillegg må vi nok ha noen unit tester så vi ikke brekker funksjonaliteten når vi gjør endringer.
src/Altinn.App.Core/Features/Validation/Default/XsdValidator.cs
Outdated
Show resolved
Hide resolved
| continue; | ||
| } | ||
| var formData = await dataAccessor.GetFormData(dataElement); | ||
| ObjectUtils.RemoveAltinnRowId(formData); |
There was a problem hiding this comment.
Bør vi fjerne altinnRowId her, eller bare kreve at den legges til som optional i xsd? Det er nok flere forskjeller, men dette er jo det eneste eksemplet (jeg har sett det har blitt klaget på) der xsd validering og data annotations gir ulikt resultat, men kanskje dere har andre grunner for å gjøre dette?
|
|
||
| if (appSettings?.XsdValidation is true) | ||
| { | ||
| services.AddTransient<IValidator, XsdValidator>(); |
There was a problem hiding this comment.
Bør det være standard å ha både DataAnnotationValidator og XsdValidator, eller bør aktivering av XsdValidation være et alternativ til dataAnnotations?
Uses the new methods to access XSD to add opt-in validation based on XSD rules, if user has a schema with the same name as the data model.
Description
XsdValidationVerification
Documentation