Forum Discussion

Ghaiath's avatar
Ghaiath
New Member
3 years ago

Generate one SwaggerUI for multiple projects where I have access to endpoints, not controllers.

Hi every body, I'm a new in Swagger world, so bear with me. 🙂

 

We have like 20 .Net projects in different 20 solutions. Each project has its own controllers and openapi endpoint (/api/meta/openapi). My task is to create an API documentation for those controllers endpoints using SwaggerUI and OpenAPI. I checked to many tutorials and all uses SwaggerUI where controllers are in the same project. I've create an ASP.Net Core and added:

 

            services.AddSwaggerGen(c =>
            {
                c.SwaggerDoc("v1", new OpenApiInfo { Title = "TestDocs", Version = "v1" });
            });
//////////////////////////////
                app.UseSwagger();
                app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "TestDocs v1"));

 

 

I have access to all these projects API endpoints (/api/meta/openapi) and I can fetch json content. But how can I represent those in Swagger dashboard? I.e. similar to this image:

Again, controllers are not in my project but I have access to all controllers endpoints.

 

Thanks in advanced.

No RepliesBe the first to reply