Just tried calling the CreateRestaurantTenant(tenant) using the _tenantRegistrationAppService class and got the same error.
[HttpPost]
public IActionResult Index(MerchantIndexViewModel input)
{
...
//validation
...
//Initialize tenant object
...
//Call to the API
_tenantAppService.CreateRestaurantTenant(tenant);
I am running the ASP.NET Core & Angular version v9.0.1
I am able to add a tenant using the Swagger call and also from the angular client. However, when I call the same API using the Public website I get an error. I tracked it down to the TenantManager
await CreateAsync(tenant);
await _unitOfWorkManager.Current.SaveChangesAsync();
The CreateAsync(tenant) creates the tenant record but it sets _unitOfWorkManager.Current to null.
Does anyone know why this is happening and how to correct it?
Thanks... Terry
Thanks. Yes, that is what I did. It was a little tedious but it works.
Thanks. I added a bit of a hack to the CustomDefaultSchemaIdSelector to differentiate between these two Customer classes for now. It seems to be working.
I don't know whether this solve it for mdframe but I changed the options.CustomSchemaIds(x => x. FullName) which resolved the issue with not being able to run the server code but, after doing an nswag refresh I am getting dozens of compilation errors when doing an npm start.
This fix allowed me to start the server app but after doing a nswag refresh, I am now getting dozens of errors when I do an npm start.
I posted a little too quickly as I found the solution at https://stackoverflow.com/questions/46071513/swagger-error-conflicting-schemaids-duplicate-schemaids-detected-for-types-a-a
I changed
options.CustomSchemaIds(SchemaIdSelector);
to
options.CustomSchemaIds(x => x.FullName);
in the SwaggerExtension CustomDefaultSchemaIdSelector
and I no longer get the error
I'm using version Abp.AspNetCore v5.10.1 using angular I haave been using this application for a while and have recently added some Stripe APIs and have suddenly run into an error when I try to log into swagger and select the "Swagger UI" button I get the error Failed to load API definition Errors Fetch error undefined /swagger/v1/swagger.json
in the log.txt file is the following error. I am not sure what is causing it or how to get rid of it.
INFO 2020-11-15 17:18:33,784 [7 ] NetCore.StaticFiles.StaticFileMiddleware - Sending file. Request path: '/favicon-32x32.png'. Physical path: 'N/A'
INFO 2020-11-15 17:18:33,785 [7 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request finished in 6.4973ms 200 image/png
ERROR 2020-11-15 17:18:34,222 [4 ] nostics.DeveloperExceptionPageMiddleware - An unhandled exception has occurred while executing the request.
System.InvalidOperationException: Can't use schemaId "$Customer" for type "$Stripe.Customer". The same schemaId is already used for type "$UnuHub.Orders.Customer"
at Swashbuckle.AspNetCore.SwaggerGen.SchemaRepository.ReserveIdFor(Type type, String schemaId)
at Swashbuckle.AspNetCore.SwaggerGen.SchemaRepository.GetOrAdd(Type type, String schemaId, Func1 factoryMethod) at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.GenerateReferencedSchema(DataContract dataContract, SchemaRepository schemaRepository) at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.GenerateSchemaForType(Type type, SchemaRepository schemaRepository) at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.GeneratePropertySchema(DataProperty serializerMember, SchemaRepository schemaRepository) at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.GenerateObjectSchema(DataContract dataContract, SchemaRepository schemaRepository) at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.GenerateInlineSchema(DataContract dataContract, SchemaRepository schemaRepository) at Swashbuckle.AspNetCore.SwaggerGen.SchemaGenerator.<>c__DisplayClass7_0.<GenerateReferencedSchema>b__0() at Swashbuckle.AspNetCore.SwaggerGen.SchemaRepository.GetOrAdd(Type type, String schemaId, Func
1 factoryMethod)
Any help is much appreciated. Thanks... Terry
I am just selecting the US flag and allowing the defaults. I changed the language to the English flag and got the same thing. The Dto that I pass to the "ExportToFile" has all the numberic fields defined as decimal or decimal?