Base solution for your next web application
Open Closed

Entity model conflicting with Entity of ASP.Net Zero #6937


User avatar
0
Hercules created

I have added the following line of code in the Startup.cs, as we have have in our models a table called Entity and it was a conflicting with the entity of asp.net zero model.

 services.AddSwaggerGen(options =>
            {
                options.SwaggerDoc("v1", new Info { Title = "KYC API", Version = "v1" });
                options.DocInclusionPredicate((docName, description) => true);

**                options.CustomSchemaIds(x => x.FullName);
**
                options.AddSecurityDefinition("Bearer", new BasicAuthScheme());
            });

By doing that when i run nswag i get the following error.

ERROR in ./src/shared/service-proxies/service-proxies.ts Module parse failed: 'return' outside of function (666:0) You may need an appropriate loader to handle this file type. | 1; | OfOfAuditLogListDtoAndSharedAnd_0AndCulture = neutralAndPublicKeyToken = null >> _observableThrow(e); | return "1OfOfAuditLogListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>observableThrow(response);\n }));\n }\n\n protected processGetAuditLogs(response: HttpResponseBase): Observable<PagedResultDto"; | 1; | OfOfAuditLogListDtoAndSharedAnd_0AndCulture = neutralAndPublicKeyToken = null > {

Could you pleaset let me know how we should handle this?


1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    see https://github.com/aspnetzero/aspnet-zero-core/issues/2205#issuecomment-488651045