Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Consider making IExcludeTypeValidationFilter a ModelMetadata setting #3168

Closed
@rynowak

Description

@rynowak

There's lots of overlap here between ModelMetadata.IsSimpleType and what IExcludeTypeValidationFilter does in practice.

I suggest removing this interface as an extensibility point, and making it just a setting on ModelMetadata - something like:

public bool ValidateProperties { get; }

There's a few concrete benefits we get from putting it on MM:

  • Caching
  • Discoverability
  • Better naming
  • Removes an extensibility point and oft-neglected option

We can retain the existing functionality if we want by adding an extension method one-liner to configure a MM provider that will configure this for a type.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions