Open rabdulatif opened 1 month ago
Thanks for opening this pull request! If you have implemented new functions, write about them in the readme file.
This pull request introduces multiple new projects to the Visual Studio solution MMLib.SwaggerForOcelot.sln
, specifically focusing on service discovery with Consul. It includes the creation of new projects such as MMLib.ServiceDiscovery.Consul
, ConsulAutoDiscovery
, ConsulApiGateway
, and AutoDiscoveryApi
. The changes also involve the removal of the Ocelot
package from several existing projects, indicating a shift in dependency management. Additionally, new configuration files and application settings are added to support the integration of Consul for service discovery and Swagger for API documentation.
File Path | Change Summary |
---|---|
MMLib.SwaggerForOcelot.sln | Added new projects: MMLib.ServiceDiscovery.Consul , ConsulAutoDiscovery , ConsulApiGateway , AutoDiscoveryApi . |
demo/ApiGateway/ApiGateway.csproj | Removed Ocelot package reference. |
demo/ApiGatewayWithEndpointInterceptor/ApiGatewayWithEndpointInterceptor.csproj | Removed Ocelot package reference. |
demo/ApiGatewayWithPath/ApiGatewayWithPath.csproj | Removed Ocelot package reference. |
demo/ConsulAutoDiscovery/AutoDiscoveryApi/AutoDiscoveryApi.csproj | New project targeting .NET 8.0 with nullable reference types enabled. |
demo/ConsulAutoDiscovery/AutoDiscoveryApi/Program.cs | Added ASP.NET Core configuration for Consul service discovery and Swagger setup. |
demo/ConsulAutoDiscovery/AutoDiscoveryApi/appsettings.Development.json | New configuration file for logging settings. |
demo/ConsulAutoDiscovery/AutoDiscoveryApi/appsettings.json | New configuration file for logging and allowed hosts. |
demo/ConsulAutoDiscovery/ConsulApiGateway/ConsulApiGateway.csproj | New project targeting .NET 8.0 with references for OpenAPI and Swagger. |
demo/ConsulAutoDiscovery/ConsulApiGateway/Program.cs | Introduced Ocelot API Gateway with Consul integration and Swagger support. |
demo/ConsulAutoDiscovery/ConsulApiGateway/appsettings.Development.json | New configuration file for logging settings. |
demo/ConsulAutoDiscovery/ConsulApiGateway/appsettings.json | New configuration file for logging and allowed hosts. |
demo/ConsulAutoDiscovery/ConsulApiGateway/ocelot.json | New configuration file for Ocelot API Gateway with service discovery settings. |
demo/OrderService/OrderService.csproj | Added project reference to MMLib.ServiceDiscovery.Consul . |
demo/OrderService/Startup.cs | Modified Startup class for improved Swagger UI configuration. |
src/MMLib.ServiceDiscovery.Consul/MMLib.ServiceDiscovery.Consul.csproj | New project targeting .NET 7.0 and .NET 8.0 with necessary package references. |
src/MMLib.ServiceDiscovery.Consul/DependencyInjection/ConfigureExtensions.cs | New file with extension methods for configuring Consul and Swagger UI. |
GetScheme
method in the SwaggerServiceDiscoveryProvider
, which is relevant to the main PR's focus on service discovery and Swagger integration within the new projects.🐰 In the meadow where rabbits play,
New projects hop in, brightening the day.
With Consul's help, we find our way,
Swagger shines, guiding our sway.
Let's celebrate this joyful array! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Overview:
This PR introduces several key updates related to Consul service discovery and Swagger endpoint handling within the Ocelot setup.
Changes:
Added
MMLib.ServiceDiscovery.Consul
:ocelot.json
to use Consul for discovery.Updated
MMLib.SwaggerForOcelot
inServiceCollectionExtensions
:AddSwaggerForOcelot
method to include conditional handling for Consul.Introduced
ConsulSwaggerEndpointProvider
:Summary by CodeRabbit
New Features
MMLib.ServiceDiscovery.Consul
,ConsulAutoDiscovery
,ConsulApiGateway
, andAutoDiscoveryApi
.AutoDiscoveryApi
.Bug Fixes
Ocelot
package references from several projects to streamline dependencies.Documentation
AutoDiscoveryApi
andConsulApiGateway
.Chores
OrderService
for better organization and clarity.