You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of building ServiceProvider on-the-fly just to resolve FluentValidationSchemaProcessor, I resolve FluentValidationSchemaProcessor during Configure(IApplicationBuilder app) into a private static variable (it is singleton anyway) and then use it in the SchemaProcessors.Add call
The text was updated successfully, but these errors were encountered:
Thanks! I was looking at the NSwag extension code and it looks like AddOpenApiDocument passes in IServiceProvider through Action<AspNetCoreOpenApiDocumentGeneratorSettings, IServiceProvider>, so we can just use it directly without having to build the service provider also.
Instead of building
ServiceProvider
on-the-fly just to resolveFluentValidationSchemaProcessor
, I resolveFluentValidationSchemaProcessor
duringConfigure(IApplicationBuilder app)
into aprivate static
variable (it is singleton anyway) and then use it in theSchemaProcessors.Add
callThe text was updated successfully, but these errors were encountered: