Open Closed

Adding Blog module #457


User avatar
0
sammy@projile.com created

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

  • ABP Framework version: v3.1.2

  • UI type: Angular

  • Tiered (MVC) or Identity Server Seperated (Angular): yes

  • Exception message and stack trace:2020-09-29 16:06:35.586 +05:30 [ERR] An unhandled exception has occurred while executing the request. System.InvalidOperationException: Can't use schemaId "$BlogDtoListResultDto" for type "$Volo.Abp.Application.Dtos.ListResultDto1[Volo.Blogging.Blogs.Dtos.BlogDto]". The same schemaId is already used for type "$Volo.Abp.Application.Dtos.ListResultDto1[Volo.Blogging.Admin.Blogs.BlogDto]"

  • Steps to reproduce the issue:

  • 1- run abp suite

  • 2- Add "Blogging" modle as nuget package

  • 3- go to visual studio and run the identity server. works fine

  • 4- go to visual studio and run the host.api module. Got Error "Failed to load API definition." Log file has above information track.

  • Please help what i am missing


4 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    I will check it out

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Add the following code to your HttpApi.Host project module class:

    private static void ConfigureSwagger(ServiceConfigurationContext context)
    {
        context.Services.AddSwaggerGen(
            options =>
            {
                options.SwaggerDoc("v1", new OpenApiInfo {Title = "qaangularng API", Version = "v1"});
                options.DocInclusionPredicate((docName, description) => true);
                options.CustomSchemaIds(type => type.ToString()); // add this line
            });
    }
    

    It will fix in next version.

  • User Avatar
    0
    sammy@projile.com created

    Hi Team, Thanks. it is working now from api side. But how to get the angular module. I was expecting that angualr module will also get installed. Please help how to install angular module.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    The blogging module not have angular UI. It just supported with MVC UI now.

Made with ❤️ on ABP v9.0.0-preview. Updated on October 07, 2024, 08:52