Error Messages:
ErrorMessage: Swashbuckle.AspNetCore.SwaggerGen.SwaggerGeneratorException: Failed to generate Operation for action - PMToolkit.API.Controllers.ReportController.GetOrderReportFilesList (PMToolkit.API). See inner exception\r\n ---\u003E Swashbuckle.AspNetCore.SwaggerGen.SwaggerGeneratorException: Failed to generate schema for type - System.Collections.Generic.IEnumerable\u00601[PMToolkit.API.Database.Models.OrderReportFile]. See inner exception\r\n ---\u003E System.InvalidOperationException: Can\u0027t use schemaId \u0022$OrderOption\u0022 for type \u0022$PMToolkit.API.Database.OrderOption\u0022. The same schemaId is already used for type \u0022$PMToolkit.API.Controllers.DelayOrdersController\u002BOrderOption\u0022\r\n at Swashbuckle.AspNetCore.SwaggerGen.SchemaRepository.RegisterType(Type type, String schemaId)\r\n at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.GenerateReferencedSchema(DataContract dataContract, SchemaRepository schemaRepository, Func\u00601 definitionFactory)\r\n at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.GenerateConcreteSchema(DataContract dataContract, SchemaRepository schemaRepository)\r\n at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.GenerateSchemaForMember(Type modelType, SchemaRepository schemaRepository, MemberInfo memberInfo, DataProperty dataProperty)\r\n at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.CreateObjectSchema(DataContract dataContract, SchemaRepository schemaRepository)\r\n at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.\u003C\u003Ec__DisplayClass10_0.\u003CGenerateConcreteSchema\u003Eb__3()\r\n at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.GenerateReferencedSchema(DataContract dataContract, SchemaRepository schemaRepository, Func\u00601 definitionFactory)\r\n at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.GenerateConcreteSchema(DataContract dataContract, SchemaRepository schemaRepository)\r\n at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.GenerateSchemaForType(Type modelType, SchemaRepository schemaRepository)\r\n at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.GenerateSchema(Type modelType, SchemaRepository schemaRepository, MemberInfo memberInfo, ParameterInfo parameterInfo)\r\n at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.CreateArraySchema(DataContract dataContract, SchemaRepository schemaRepository)\r\n at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.\u003C\u003Ec__DisplayClass10_0.\u003CGenerateConcreteSchema\u003Eb__1()\r\n at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.GenerateConcreteSchema(DataContract dataContract, SchemaRepository schemaRepository)\r\n at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.GenerateSchemaForType(Type modelType, SchemaRepository schemaRepository)\r\n at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.GenerateSchema(Type modelType, SchemaRepository schemaRepository, MemberInfo memberInfo, ParameterInfo parameterInfo)\r\n at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GenerateSchema(Type type, SchemaRepository schemaRepository, PropertyInfo propertyInfo, ParameterInfo parameterInfo)\r\n --- End of inner exception stack trace ---\r\n at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GenerateSchema(Type type, SchemaRepository schemaRepository, PropertyInfo propertyInfo, ParameterInfo parameterInfo)\r\n at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.CreateResponseMediaType(ModelMetadata modelMetadata, SchemaRepository schemaRespository)\r\n at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.\u003C\u003Ec__DisplayClass19_0.\u003CGenerateResponse\u003Eb__2(String contentType)\r\n at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable\u00601 source, Func\u00602 keySelector, Func\u00602 elementSelector, IEqualityComparer\u00601 comparer)\r\n at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable\u00601 source, Func\u00602 keySelector, Func\u00602 elementSelector)\r\n at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GenerateResponse(ApiDescription apiDescription, SchemaRepository schemaRepository, String statusCode, ApiResponseType apiResponseType)\r\n at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GenerateResponses(ApiDescription apiDescription, SchemaRepository schemaRepository)\r\n at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GenerateOperation(ApiDescription apiDescription, SchemaRepository schemaRepository)\r\n --- End of inner exception stack trace ---\r\n at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GenerateOperation(ApiDescription apiDescription, SchemaRepository schemaRepository)\r\n at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GenerateOperations(IEnumerable\u00601 apiDescriptions, SchemaRepository schemaRepository)\r\n at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GeneratePaths(IEnumerable\u00601 apiDescriptions, SchemaRepository schemaRepository)\r\n at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GetSwagger(String documentName, String host, String basePath)\r\n at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)\r\n at Steeltoe.Management.Endpoint.CloudFoundry.CloudFoundrySecurityMiddleware.Invoke(HttpContext context)\r\n at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context).
Solution:
You must add a swagger config as below:
You must add a swagger config as below:
services.ConfigureSwaggerGen(opt =>
{
opt.CustomSchemaIds(x => x.FullName);
});
Read More:
- [Solved] Matlab Code generate error: failed to generate all binary outputs
- ERROR: [IMPL 213-28] Failed to generate IP.
- HLS ERROR: [IMPL 213-28] Failed to generate IP. [How to Solve]
- Vivado Error: [Chipscope 16-302]Could not generate core for dbg_hub.Aborting IP Generate operaion.The current Vivado temporary directory path.
- Docker Build Error: Failed to get D-Bus connection: Operation not permitted [Solved]
- Python Importerror: DLL load failed: the page file is too small to complete the operation.
- How to Solve Archetype generate Error
- How to Solve VS2019 Re-generate Error
- [Solved] hcitool Error: Set scan parameters failed: Operation not permitted
- [Solved] Quartus 13 Uses IP Core NCO to generate DDS Error: Megawizard Error
- Nacos Click service offline error: caused: errCode: 500, errmsg: do metadata operation failed;
- How to Solve elasticsearch-7.15.1 operation errors
- Postgres uuid_generate_v1() does not exist [How to Solve]
- Vitis-AI Generate a Quantitative Model: NotImplementedError
- Wildfly (JBoss) startup error: ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation (“add”) failed
- NUXT Run generate error: is not in cwd [How to Solve]
- With regard to coredata storage, the operation could’t be completed. (cocoa error 133020.)
- [Solved] Error: unable to perform an operation on node ‘rabbit@DESKTOP-xxx‘. Please see diagnostics informa
- [Solved] Rabbitmq Server Error: unable to perform an operation on node ‘rabbit@nscczzms‘. P
- [Solved] @webservice Error: org.apache.cxf.common.i18n.UncheckedException: No operation was found with