configure the api list doc use Rest Api plugin 4.1

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
I have downloaded the Rest Api plugin 4.1 and enable API and Swagger in backgroud, but the page always is not find when i link http://localhost:15536/swagger/docs/ or http://localhost:15536/swagger/ui/index#/ .

so I change ApiStartup.cs code to
  // The default route templates for the Swagger docs and swagger - ui are "swagger/docs/{apiVersion}" and "swagger/ui/index#/{assetPath}" respectively.
            app.UseSwagger();
            app.UseSwaggerUI(options =>
                {
                    //var currentAssembly = Assembly.GetAssembly(this.GetType());
                    //var currentAssemblyName = currentAssembly.GetName().Name;

                    //Needeed for removing the "Try It Out" button from the post and put methods.
                    //http://stackoverflow.com/questions/36772032/swagger-5-2-3-supportedsubmitmethods-removed/36780806#36780806

                    //options.InjectOnCompleteJavaScript($"{currentAssemblyName}.Scripts.swaggerPostPutTryItOutButtonsRemoval.js");

                    options.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
                }
            );


then app.UseSwagger is error ,so i Install-Package Swashbuckle.AspNetCore -Pre,the solution is ok,but the background api is   disappear.


so my question is how can i  configure the API list document in correct way?
5 years ago
Any news???????????
https://github.com/SevenSpikes/api-plugin-for-nopcommerce/issues/165
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.