Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip validation #80

Merged
merged 5 commits into from
Mar 4, 2024
Merged

Skip validation #80

merged 5 commits into from
Mar 4, 2024

Conversation

pogromistik
Copy link
Contributor

No description provided.

@@ -14,6 +14,7 @@ public class FluentGraphValidator : IFluentGraphValidator
private readonly ILogger<FluentGraphValidator> logger;
private readonly IOptions<FluentGraphValidatorOptions> options;
private readonly IServiceScope serviceScope;
private readonly ConcurrentDictionary<string, bool> skipAttributes = new();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignorePropertiesCache

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FluentGraphValidator это синглтон или нет? Если нет, то давай сделаем static чтоли

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scoped

Copy link
Member

@SonicGD SonicGD Mar 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignoredPropertiesCache, сорян)

@@ -166,6 +167,13 @@ or byte

foreach (var property in modelGraphValidationContext.Model.GetType().GetProperties())
{
var needSkipAttribute = skipAttributes.GetOrAdd($"{modelGraphValidationContext.Model.GetType()}_{property.Name}", _ => property.GetCustomAttributes(typeof(SkipGraphValidationAttribute), true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isSkippedProperty?

@pogromistik pogromistik merged commit 50829a8 into main Mar 4, 2024
2 checks passed
@sitkobot
Copy link
Collaborator

sitkobot commented Mar 4, 2024

🎉 This PR is included in version 1.11.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants