MMLib.SwaggerForOcelot
MMLib.SwaggerForOcelot copied to clipboard
Consul integration with serviceName prefix and ConsulClient library
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
:- Introduced a new project for Consul service auto-discovery.
- This enables clients who don't define Swagger endpoints in their
ocelot.json
to use Consul for discovery.
-
Updated
MMLib.SwaggerForOcelot
inServiceCollectionExtensions
:- Modified the
AddSwaggerForOcelot
method to include conditional handling for Consul. - Now checks if Consul is being used, to configure Swagger appropriately.
- Modified the
-
Introduced
ConsulSwaggerEndpointProvider
:- This new class retrieves Swagger endpoints from Consul for clients using Consul or PollConsul as the discovery type.
- It ensures proper Swagger integration with Consul-managed services.
Summary by CodeRabbit
-
New Features
- Introduced multiple new projects for enhanced service discovery and API management, including
MMLib.ServiceDiscovery.Consul
,ConsulAutoDiscovery
,ConsulApiGateway
, andAutoDiscoveryApi
. - Added Swagger support for API documentation in new projects.
- Implemented a weather forecast endpoint in the
AutoDiscoveryApi
.
- Introduced multiple new projects for enhanced service discovery and API management, including
-
Bug Fixes
- Removed outdated
Ocelot
package references from several projects to streamline dependencies.
- Removed outdated
-
Documentation
- New configuration files for development and production settings in
AutoDiscoveryApi
andConsulApiGateway
.
- New configuration files for development and production settings in
-
Chores
- Restructured Swagger UI configuration in the
OrderService
for better organization and clarity.
- Restructured Swagger UI configuration in the