Done
Details
Assignee
Adam DickmeissAdam DickmeissReporter
Julian LadischJulian LadischLabels
Priority
P2Story Points
2Sprint
NoneDevelopment Team
Core: PlatformFix versions
TestRail: Cases
Open TestRail: CasesTestRail: Runs
Open TestRail: Runs
Details
Details
Assignee
Adam Dickmeiss
Adam DickmeissReporter
Julian Ladisch
Julian LadischLabels
Priority
Story Points
2
Sprint
None
Development Team
Core: Platform
Fix versions
TestRail: Cases
Open TestRail: Cases
TestRail: Runs
Open TestRail: Runs
Created September 1, 2020 at 12:28 PM
Updated June 30, 2022 at 5:23 PM
Resolved April 14, 2021 at 10:05 AM
Deprecate HttpClientInterface. It is based on java.util.concurrent.CompletableFuture.
RMB based modules should use Vert.x WebClient instead that is based on io.vertx.core.Future.
Vert.x futurisation makes using Future more easy and concise: https://github.com/folio-org/raml-module-builder/blob/master/doc/futurisation.md
RMB has
HttpClientInterface
HttpModuleClient2 implements HttpClientInterface
HttpClientMock2 implements HttpClientInterface
HttpClientFactory returning HttpClientInterface (either HttpClientMock2 or HttpModuleClient2)
RestVerticle sets HttpClientMock2.MOCK_MODE, HttpClientFactory reads it.
RMB based modules should use vertx.createHttpServer() to mock a server, or use mockito (or any other mocking possibility) to mock WebClient.
There are no plans to remove these classes yet. Deprecation only to discourage usage.
This was discussed on raml-module-builder slack channel on August 28, 2020 and nobody disagreed.
Tasks:
Deprecate HttpClientInterface, HttpModuleClient2, HttpClientMock2, HttpClientFactory.
Add the
@Deprecated
annotation to each of them.Add a
@deprecated
Javadoc tag to each of them explaining what to use instead.Explain the deprecation and possible replacements in the RMB upgrading notes.
Rewrite the README section that mentions these deprecated classes.