diff --git a/ramls/inventory.raml b/ramls/inventory.raml index 99c3c63c5..0b780b512 100644 --- a/ramls/inventory.raml +++ b/ramls/inventory.raml @@ -295,18 +295,18 @@ resourceTypes: Possible values of the 'relations' parameter are: 'onlyBoundWiths', 'onlyBoundWithsSkipDirectlyLinkedItem'", example: "holdingsRecordId==\"[UUID]\""} ] - /tenant-items: - displayName: Fetch items based on tenant IDs - post: - body: - application/json: - type: tenantItemPairCollection - responses: - 200: - description: "Fetched items based on tenant IDs" - body: - application/json: - type: items + /tenant-items: + displayName: Fetch items based on tenant IDs + post: + body: + application/json: + type: tenantItemPairCollection + responses: + 200: + description: "Fetched items based on tenant IDs" + body: + application/json: + type: items /holdings/{holdingsId}: put: description: Update Holdings by holdingsId diff --git a/src/main/java/org/folio/inventory/InventoryVerticle.java b/src/main/java/org/folio/inventory/InventoryVerticle.java index d76f01ea0..1cc59b389 100644 --- a/src/main/java/org/folio/inventory/InventoryVerticle.java +++ b/src/main/java/org/folio/inventory/InventoryVerticle.java @@ -72,7 +72,7 @@ public void start(Promise started) { new InventoryConfigApi().register(router); new TenantApi().register(router); new UpdateOwnershipApi(storage, client, consortiumService).register(router); - new TenantItems(storage, client).register(router); + new TenantItems(client).register(router); Handler> onHttpServerStart = result -> { if (result.succeeded()) { diff --git a/src/main/java/org/folio/inventory/resources/TenantItems.java b/src/main/java/org/folio/inventory/resources/TenantItems.java index 5fd2fe57b..973192d65 100644 --- a/src/main/java/org/folio/inventory/resources/TenantItems.java +++ b/src/main/java/org/folio/inventory/resources/TenantItems.java @@ -34,7 +34,7 @@ import io.vertx.ext.web.RoutingContext; import io.vertx.ext.web.client.WebClient; -public class TenantItems extends AbstractInventoryResource { +public class TenantItems { private static final Logger log = LogManager.getLogger(MethodHandles.lookup().lookupClass()); @@ -42,11 +42,12 @@ public class TenantItems extends AbstractInventoryResource { public static final String ITEMS_FIELD = "items"; public static final String TOTAL_RECORDS_FIELD = "totalRecords"; - public TenantItems(Storage storage, HttpClient client) { - super(storage, client); + private final HttpClient client; + + public TenantItems(HttpClient client) { + this.client = client; } - @Override public void register(Router router) { router.post(TENANT_ITEMS_PATH).handler(this::getItemsFromTenants); }