- Use new registration method AddFluentValidationRulesToSwagger instead of AddFluentValidationRules to allow all feature set
- AddFluentValidationRules become obsolete
- Added ability to set ServiceLifetime in AddFluentValidationRulesToSwagger, default value: Scoped. Fixes #83
- Turned off test rule BeforeAll. Fixes #87
- More detailed warnings in FluentValidationRulesScopeAdapter
- Added detailed error on getting absent property by name
- FluentValidation updated to 10.0.0
- Swashbuckle.AspNetCore updated to 6.0.0
- RuleContext: Obsolete SchemaFilterContext replaced with ReflectionContext (removed dependency on Swashbuckle)
- Dependency Swashbuckle.AspNetCore changed to Swashbuckle.AspNetCore.SwaggerGen which is UI independent (PR#82 by buvinghausen)
- Added INameResolver to resolve names. Issue #80
- Added AddFluentValidationRulesToSwagger extensions to simplify registration
- FluentValidationSwaggerGenOptions renamed to SchemaGenerationOptions, IsAllOffSupported renamed to UseAllOffForMultipleRules
- Fixed #79: Adding a simple Length validation to a string field should not make the field non-nullable
- Fixed #76: SetValidator is applying FluentValidation rules to parent object property with same name
- Swashbuckle.AspNetCore version supports up to 7 (PR#75 by fabich)
- RuleForEach supported. Issue #66
- SetValidator supported. Issue #68
- Multiple match rules supported with allOf. Issue #69
- Fixed #67: Absence of MinimumLength should not override nullable. (PR#67 by bcronje)
- Fixed #70: Nullability for numerics if MinLength is greater then zero
- Nullable annotations added
- FluentValidation updated to [9.0.0]
- Swashbuckle.AspNetCore updated to [5.5.1]
- Changed getting included validator (FluentValidation internal API changed)
- New EmailValidator rule compatible with FluentValidation AspNetCoreCompatibleEmailValidator
- FluentValidation fix version to [8.3.0, 9)
- Swashbuckle.AspNetCore fix version to [5.2.0, 6)
- Base type for numeric switched to decimal to match type change in OpenApi. Fixes floating numbers with nines after period.
- More smart MinLength, MaxLength, Minimum, Maximum that allows to combine rules without override values.
- More strict limits will be used for min and max values that was set more then once in other rules
- Mark required properties as not nullable (PR#58 by @manne) Fixes: #55, #57
- Swashbuckle.AspNetCore updated to version >= 5.2.0
- Fixed: #53 (Missing method exception when using Swashbuckle > 5.0.0)
-
Supports Swashbuckle 5, net core 3 and brand new System.Text.Json
-
Swashbuckle.AspNetCore updated to version >= 5.0.0 (new Microsoft.OpenApi)
-
FluentValidation updated to version >= 8.3
-
FluentValidation property rules of type CollectionValidationRules (RuleForEach()) are no longer exposed #49.
-
New IgnoreAllStringComparer was invented to solve problem with different property name formatting: camelCase, PascalCase, snake_case, kebab-case
-
Added NewtonsoftJsonNamingPolicy example to override property name formatting in new System.Text.Json according Newtonsoft.Json.Serialization.NamingStrategy (see: SampleWebApi)
-
Fixed invalid documentation on validation rules containing a condition #38
-
Fixed: #37 (FluentValidationOperationFilter now uses swachbuckle interface to determine json settings)
- Swashbuckle.AspNetCore updated to version >= 5.0.0
- FluentValidation property rules of type CollectionValidationRules (RuleForEach()) are no longer exposed #49.
- Swashbuckle.AspNetCore updated to version >= 5.0.0-rc4 (breaking changes: IApiModelResolver was removed from API)
- New IgnoreAllStringComparer was invented to solve problem with different property name formatting: camelCase, PascalCase, snake_case, kebab-case
- Added NewtonsoftJsonNamingPolicy example to override property name formatting in new System.Text.Json according Newtonsoft.Json.Serialization.NamingStrategy (see: SampleWebApi)
- Updated FluentValidation to version >= 8.3
- Fixed invalid documentation on validation rules containing a condition #38
- Swashbuckle.AspNetCore updated to version >= 5.0.0-rc4
- Fixed: #37 (FluentValidationOperationFilter now uses swachbuckle interface to determine json settings)
- Swashbuckle.AspNetCore updated to version >= 5.0.0-rc3 (PR#35 by @vova-lantsov-dev)
- Reintegrated features from 2.2.0
- Swashbuckle.AspNetCore updated to version >= 5.0.0-rc2 (many breaking changes)
- Swashbuckle.AspNetCore updated to version >= 5.0.0-beta
- Added HttpContextServiceProviderValidatorFactory to resolve scoped Dependency Injection (PR#34) by @WarpSpideR
- Fixed MinLength rewrite by MaxLength validator #32
- Changes: Allow to use SwaggerGenOptions.CustomSchemaIds (PR#31) by @mkjeff
- Fixed: #24: NullReferenceException on apply rule for operations.
- Changes: Added more debug logging.
- Swashbuckle.AspNetCore updated and restricted to version [4.0.0, 5.0.0)
- Breaking Changes: FluentValidation updated to 8.1.3 to support when/unless (PR#27) by @emilssonn
- Changes: Running through included validators recursively to add the entire tree (PR#29) by @runebaekkelund
- Changes: Numeric types includes decimal
- Changes: Schema Minimum and Maximum now supports doubles (was only int)
- WARNING: ScopedSwaggerMiddleware doesn't work as expected because Swashbuckle.AspNetCore changed a lot. Looking for workaround.
- Added: Numeric types includes decimal
- Swashbuckle.AspNetCore version locked to versions [1.1.0-3.0.0] because version 4.0.0 has breaking changes. Next version will be 2.0.0 according semver.
- Added ScopedSwaggerMiddleware to resolve error "Cannot resolve 'MyValidator' from root provider because it requires scoped service 'TDependency'"
- Added support for Include
- Bugfixes
- Updated samples and documentation
- Build scripts migrated to MicroElements.Devops
- Build: added SourceLink
- Fixed: #13: Fixed warning with null schema.Properties
- Fixed: #12: Fixed NullReferenceException, if schema.Properties is null
- New feature: FluentValidation rules for get operation parameters binded from models with validators. Adds swagger validation for parameters: Required, MinLength, MaxLength, Minimum, Maximum, Pattern (DataAnnotation works only with [Required]).
- Fixed: #10: Now member search is IgnoreCase
- Fixed: Possible double Required
- Improved stability and diagnostics
- Added GetValidator error handling, ApplyRule error handling
- Added ability to work without provided FluentValidation (does not break anything)
- Added ability to use Microsoft.Extensions.Logging.Abstractions (no additional dependencies)
- Added logging in error points (logs as warnings)
- Fixed: #6: Removed empty required array from swagger schema
- Supported float and double values for IComparisonValidator and IBetweenValidator
- Refactored to easy add new rules
- Added ability to add rules through DI Supported validators:
- INotNullValidator (NotNull)
- INotEmptyValidator (NotEmpty)
- ILengthValidator (Length, MinimumLength, MaximumLength, ExactLength)
- IRegularExpressionValidator (Email, Matches)
- IComparisonValidator (GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual)
- IBetweenValidator (InclusiveBetween, ExclusiveBetween)
- FluentValidationRulesRegistrator moved to main swagger namespace
- Added FluentValidationRulesRegistrator
- Added FluentValidationRules.
Full release notes can be found at https://github.com/micro-elements/MicroElements.Swashbuckle.FluentValidation/blob/master/CHANGELOG.md