Property level validation for Management API (#15644)
* Property level validation for content - initial implementation * Always succeed create/update regardless of property level validation errors * Move old complex editor validation classes to Web.BackOffice so they will be deleted * Include operation status and property validation errors in ProblemDetails * Refactor property validation to its own service(s) * Make the problem details builder a little more generic towards extensions * Validation for item and branch publish * Moved malplaced test * Get rid of a TODO * Integration tests for content validation service * Simplify validation service * Add missing response types to create and update for document and media * Remove test that no longer applies * Use "errors" for model validation errors (property validation errors) * Split create/update and validation into their own endpoints * Fix forward merge * Correct wrong assumption for missing properties * Remove localization from validation error messages - decreases dependencies, adds a lot of obsolete constructors * Reuse existing validation service + support custom error messages * Fix merge errors * Review comments
This commit is contained in:
@@ -624,14 +624,12 @@ public class VariationTests
|
||||
{
|
||||
var ioHelper = Mock.Of<IIOHelper>();
|
||||
var dataTypeService = Mock.Of<IDataTypeService>();
|
||||
var localizedTextService = Mock.Of<ILocalizedTextService>();
|
||||
var editorConfigurationParser = Mock.Of<IEditorConfigurationParser>();
|
||||
|
||||
var attribute = new DataEditorAttribute("a", "a", "a");
|
||||
var dataValueEditorFactory = Mock.Of<IDataValueEditorFactory>(x
|
||||
=> x.Create<TextOnlyValueEditor>(It.IsAny<DataEditorAttribute>()) == new TextOnlyValueEditor(
|
||||
attribute,
|
||||
localizedTextService,
|
||||
Mock.Of<IShortStringHelper>(),
|
||||
new JsonNetSerializer(),
|
||||
Mock.Of<IIOHelper>()));
|
||||
@@ -652,7 +650,6 @@ public class VariationTests
|
||||
return new PropertyValidationService(
|
||||
propertyEditorCollection,
|
||||
dataTypeService,
|
||||
localizedTextService,
|
||||
new ValueEditorCache());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user