Skip to content

Develop#5

Merged
raulidavid merged 2 commits intomainfrom
develop
Oct 18, 2025
Merged

Develop#5
raulidavid merged 2 commits intomainfrom
develop

Conversation

@raulidavid
Copy link
Copy Markdown
Owner

No description provided.

Replaced the existing `services.AddHttpClient<NswagConfiguration>()` setup with a more robust configuration that validates and sets the `BaseAddress` using the `JibanConstants.NswagBaseUrl` environment variable. Added a check to throw an `InvalidOperationException` if the `BaseAddress` is missing or empty. Retained existing message handlers and policies to ensure consistent behavior. This change improves maintainability and prevents runtime issues caused by missing configuration.
Simplified NSwag-generated clients by removing `NswagBase` and
`NswagConfiguration` dependencies. Updated constructors to
directly accept `HttpClient`. Removed `_baseUrl` logic from
`NswagConfiguration`.

Refactored `AddInfrastructureServices` to register a generic
`HttpClient` and re-ordered service registrations. Updated
`config.nswag` to remove `clientBaseClass` and `configurationClass`
settings, ensuring direct `HttpClient` injection.

These changes improve maintainability, reduce complexity, and
streamline the dependency injection setup.
@raulidavid raulidavid merged commit 18e268a into main Oct 18, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant