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
Error message:
System.TypeInitializationException: The type initializer for 'FastEndpoints.Swagger.OperationProcessor' threw an exception.
---> System.Globalization.CultureNotFoundException: Only the invariant culture is supported in globalization-invariant mode. See https://aka.ms/GlobalizationInvariantMode for more information. (Parameter 'name')
en-US is an invalid culture identifier.
at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride)
at FastEndpoints.Swagger.OperationProcessor..cctor()
--- End of inner exception stack trace ---
at FastEndpoints.Swagger.OperationProcessor.Process(OperationProcessorContext ctx)
at NSwag.Generation.AspNetCore.AspNetCoreOpenApiDocumentGenerator.RunOperationProcessors(OpenApiDocument document, ApiDescription apiDescription, Type controllerType, MethodInfo methodInfo, OpenApiOperationDescription operationDescription, List`1 allOperations, OpenApiDocumentGenerator swaggerGenerator, OpenApiSchemaResolver schemaResolver)
privatestaticreadonlyTextInfotextInfo= CultureInfo.Invariant.TextInfo;// or if we need a copyprivatestaticreadonlyTextInfotextInfo=(TextInfo)CultureInfo.Invariant.TextInfo.Clone();
Maybe it would help but I'm not certain. It might be a breaking change I'm not fammiliar with nswag library.
The text was updated successfully, but these errors were encountered:
I think i can't use swagger inside docker or maybe i'm doing something wrong
Context:
Dockerimage: mcr.microsoft.com/dotnet/aspnet:6.0.10-alpine3.16-amd64
Relevant swagger config:
Error message:
System.TypeInitializationException: The type initializer for 'FastEndpoints.Swagger.OperationProcessor' threw an exception.
---> System.Globalization.CultureNotFoundException: Only the invariant culture is supported in globalization-invariant mode. See https://aka.ms/GlobalizationInvariantMode for more information. (Parameter 'name')
en-US is an invalid culture identifier.
at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride)
at FastEndpoints.Swagger.OperationProcessor..cctor()
--- End of inner exception stack trace ---
at FastEndpoints.Swagger.OperationProcessor.Process(OperationProcessorContext ctx)
at NSwag.Generation.AspNetCore.AspNetCoreOpenApiDocumentGenerator.RunOperationProcessors(OpenApiDocument document, ApiDescription apiDescription, Type controllerType, MethodInfo methodInfo, OpenApiOperationDescription operationDescription, List`1 allOperations, OpenApiDocumentGenerator swaggerGenerator, OpenApiSchemaResolver schemaResolver)
I think it is because
https://github.com/FastEndpoints/FastEndpoints/blob/main/Src/Swagger/OperationProcessor.cs#L19
I'm not sure if we could replace it by something like:
Maybe it would help but I'm not certain. It might be a breaking change I'm not fammiliar with nswag library.
The text was updated successfully, but these errors were encountered: