Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Requires `API_NAME vX.Y`

### Features
* Description ([ISSUE](https://folio-org.atlassian.net/browse/ISSUE))
* Migrate Package Endpoints to HoldingsIQ v2 API ([MODKBEKBJ-804](https://folio-org.atlassian.net/browse/MODKBEKBJ-804))

### Bug fixes
* Fix offset handling when retrieving holdings from HoldingsIQ. ([MODKBEKBJ-825](https://folio-org.atlassian.net/browse/MODKBEKBJ-825))
Expand Down
111 changes: 34 additions & 77 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<rmb.version>36.0.0</rmb.version>
<folio-di-support.version>4.0.0</folio-di-support.version>
<folio-service-tools.version>6.0.0</folio-service-tools.version>
<folio-holdingsiq-client.version>5.0.0</folio-holdingsiq-client.version>
<folio-holdingsiq-client.version>6.0.0-SNAPSHOT</folio-holdingsiq-client.version>
<folio-liquibase-util.version>1.11.0</folio-liquibase-util.version>

<vertx.version>5.1.2</vertx.version>
Expand All @@ -50,7 +50,6 @@
<commons-codec.version>1.22.0</commons-codec.version>
<commons-beanutils.version>1.11.0</commons-beanutils.version>
<lombok.version>1.18.46</lombok.version>
<httpcore.version>4.4.16</httpcore.version>
<opencsv.version>5.12.0</opencsv.version>
<commons-lang3.version>3.20.0</commons-lang3.version>

Expand All @@ -61,11 +60,12 @@

<!-- Test dependencies versions -->
<spring.version>7.0.8</spring.version>
<junit.version>4.13.2</junit.version>
<junit.version>6.1.0</junit.version>
<rest-assured.version>6.0.0</rest-assured.version>
<mockito.version>5.23.0</mockito.version>
<assertj.version>3.27.7</assertj.version>
<jsonassert.version>1.5.3</jsonassert.version>
<wiremock.version>3.13.2</wiremock.version>
<easy-random-core.version>5.0.0</easy-random-core.version>

<!-- Plugins versions -->
Expand All @@ -88,24 +88,6 @@
<checkstyle.version>13.6.0</checkstyle.version>
</properties>

<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<test.coverage.skip>false</test.coverage.skip>
</properties>
</profile>
<profile>
<id>no-coverage</id>
<properties>
<test.coverage.skip>true</test.coverage.skip>
</properties>
</profile>
</profiles>

<dependencyManagement>
<dependencies>
<dependency>
Expand All @@ -129,6 +111,13 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${junit.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down Expand Up @@ -195,11 +184,6 @@
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>${httpcore.version}</version>
</dependency>
<dependency>
<groupId>org.folio</groupId>
<artifactId>folio-di-support</artifactId>
Expand Down Expand Up @@ -240,22 +224,27 @@
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-unit</artifactId>
<artifactId>vertx-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.folio</groupId>
<artifactId>postgres-testing</artifactId>
<version>${rmb.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
Expand All @@ -275,6 +264,12 @@
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
Expand All @@ -288,37 +283,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.folio</groupId>
<artifactId>folio-service-tools-test</artifactId>
<version>${folio-service-tools.version}</version>
<exclusions>
<exclusion>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
</exclusion>
<exclusion>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-engine</artifactId>
</exclusion>
<exclusion>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-commons</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
<groupId>org.wiremock</groupId>
<artifactId>wiremock</artifactId>
<version>${wiremock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -686,15 +653,11 @@
<version>${maven-surefire-plugin.version}</version>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
<excludes>
**/org/folio/rest/impl/integrationsuite/*.java
</excludes>
<includes>
<include>**/Test*.java</include>
<include>**/*Test.java</include>
<include>**/*Tests.java</include>
<include>**/*TestCase.java</include>
<include>org/folio/rest/impl/IntegrationTestSuite.java</include>
</includes>
</configuration>
</plugin>
Expand All @@ -709,19 +672,13 @@
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<skip>${test.coverage.skip}</skip>
</configuration>
</execution>
<execution>
<id>jacoco-coverage-report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<skip>${test.coverage.skip}</skip>
</configuration>
</execution>
</executions>
</plugin>
Expand Down
5 changes: 3 additions & 2 deletions ramls/packages.raml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ documentation:

traits:
queriable: !include traits/queriable.raml
packageQueriable: !include traits/packageQueriable.raml
sortable: !include traits/sortable.raml
pageable: !include traits/pageable.raml
filterable: !include traits/filterable.raml
packageFilterable: !include traits/packageFilterable.raml
taggable: !include traits/taggable.raml
accessible: !include traits/accessible.raml
packageResourcesFilterable: !include traits/packageResourcesFilterable.raml
Expand All @@ -34,7 +35,7 @@ types:
displayName: Packages
get:
description: Retrieve a collection of packages based on the search query.
is: [queriable, filterable, taggable, accessible,
is: [packageQueriable, packageFilterable, taggable, accessible,
sortable: {defaultValue: 'relevance', possibleValues: 'name, relevance'},
pageable: {maxCountValue: 100, defaultCountValue: 25}]
queryParameters:
Expand Down
5 changes: 3 additions & 2 deletions ramls/providers.raml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ traits:
queriable: !include traits/queriable.raml
sortable: !include traits/sortable.raml
pageable: !include traits/pageable.raml
filterable: !include traits/filterable.raml
packageFilterable: !include traits/packageFilterable.raml
packageQueriable: !include traits/packageQueriable.raml
taggable: !include traits/taggable.raml
accessible: !include traits/accessible.raml
includable: !include traits/includePackages.raml
Expand Down Expand Up @@ -128,7 +129,7 @@ traits:
/packages:
get:
description: Search within a list of packages associated with a given provider.
is: [queriable, taggable, accessible, filterable,
is: [packageQueriable, taggable, accessible, packageFilterable,
sortable: {defaultValue: 'relevance', possibleValues: 'name, relevance'},
pageable: {maxCountValue: 100, defaultCountValue: 25}]
responses:
Expand Down
16 changes: 0 additions & 16 deletions ramls/traits/filterable.raml

This file was deleted.

33 changes: 33 additions & 0 deletions ramls/traits/packageFilterable.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
queryParameters:
filter[selected]:
displayName: Selection status
type: string
description: Filter to narrow down results based on selection status. Possible values are all, true, false, ebsco.
example: all
required: false
filter[type]:
displayName: Content type
type: string
description: |
Filter to narrow down results based on content type. Defaults to all.
Possible values: all, aggregatedfulltext, abstractandindex, ebook, ejournal, print, unknown, streamingmedia, mixedcontent, onlinereference.
example: ebook
default: all
required: false
filter[visibility]:
displayName: Visibility status
type: string
description: |
Limits the results based on customer visibility status per product category.
Only functions when selection=selected is included in the request.
Possible values: visibleInPF, visibleInFTF, visibleInMARC, hiddenInPF, hiddenInFTF, hiddenInMARC
example: visibleInPF
required: false
filter[access]:
displayName: Package access
type: string
description: |
Limits the results based on Package Free Access.
Possible values: public, controlled
example: public
required: false
27 changes: 27 additions & 0 deletions ramls/traits/packageQueriable.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
queryParameters:
q:
displayName: Search query
type: string
description: String used to search to retrieve a collection
example: ABC-CLIO
required: false
q[field]:
displayName: Search field
type: string
description: |
Field to search.
name - Searches on Package Names and Alternative Names.
keyword - Searches on Package Name, Alternative Name, Vendor Name, Managed Description and Custom Description.
default: name
q[type]:
displayName: Search type
type: string
description: |
Type of search to be performed.
Possible values: exactphrase, advanced, any, contains, exactmatch, beginswith
highlight:
displayName: Hit highlighting
type: boolean
description: If enabled, highlight which parts of the Package result were matched on during searching
required: false
default: false
21 changes: 21 additions & 0 deletions ramls/types/packages/packageAltName.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Alternate names schema",
"description": "Alternate names schema",
"javaType": "org.folio.rest.jaxrs.model.PackageAltName",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "integer",
"description": "The id of the alternate name of the package."
},
"altName": {
"type": "string",
"description": "The alternate name of the package"
}
},
"required": [
"altName"
]
}
Loading
Loading