Uploaded image for project: 'RAML Module Builder'
  1. RAML Module Builder
  2. RMB-717

Deprecate HttpClientInterface, HttpModuleClient2, HttpClientMock2

    XMLWordPrintable

Details

    • CP: sprint 111, CP: sprint 112
    • 2
    • Core: Platform

    Description

      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.

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                adam Adam Dickmeiss
                julianladisch Julian Ladisch
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases