Skip to content

Commit

Permalink
CIRCSTORE-536: Upgrade to RMB v35.3.0 (#493)
Browse files Browse the repository at this point in the history
Upgrade to RMB v35.3.0 (#493)
  • Loading branch information
AntonAntonich authored Oct 25, 2024
1 parent afa222f commit f9371d6
Show file tree
Hide file tree
Showing 33 changed files with 213 additions and 279 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/postgres.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: postgres
on:
workflow_dispatch:
inputs:
postgres:
description: "List of postgres container images, to be injected as TESTCONTAINERS_POSTGRES_IMAGE"
default: '["postgres:16-alpine", "postgres:18-alpine"]'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
postgres: ${{ fromJSON(github.event.inputs.postgres) }}
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: maven
- run: mvn --batch-mode verify
env:
TESTCONTAINERS_POSTGRES_IMAGE: ${{ matrix.postgres }}
9 changes: 7 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<ramlfiles_path>${basedir}/ramls</ramlfiles_path>
<vertx-version>4.5.9</vertx-version>
<raml-module-builder-version>35.2.0</raml-module-builder-version>
<raml-module-builder-version>35.3.0</raml-module-builder-version>
<spring.version>6.1.5</spring.version>
<argLine />
</properties>
Expand Down Expand Up @@ -181,7 +181,12 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<version>3.17.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
Expand Down
3 changes: 0 additions & 3 deletions ramls/actual-cost-record-storage.raml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ types:
parameters: !include raml-util/schemas/parameters.schema

traits:
language: !include raml-util/traits/language.raml
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
validate: !include raml-util/traits/validation.raml
Expand Down Expand Up @@ -55,5 +54,3 @@ resourceTypes:
is: [validate]
delete:
description: "Delete actual cost record"
is: [language]

2 changes: 0 additions & 2 deletions ramls/cancellation-reason.raml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ types:
parameters: !include raml-util/schemas/parameters.schema

traits:
language: !include raml-util/traits/language.raml
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
validate: !include raml-util/traits/validation.raml
Expand Down Expand Up @@ -48,7 +47,6 @@ resourceTypes:
501:
description: "Not implemented yet"
delete:
is: [language]
responses:
204:
description: "All cancellation reasons deleted"
Expand Down
1 change: 0 additions & 1 deletion ramls/check-in-storage.raml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ types:
check-ins: !include check-ins.json

traits:
language: !include raml-util/traits/language.raml
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
validate: !include raml-util/traits/validation.raml
Expand Down
1 change: 0 additions & 1 deletion ramls/circulation-settings-storage.raml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ documentation:
content: <b>Storage for circulation settings</b>

traits:
language: !include raml-util/traits/language.raml
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
validate: !include raml-util/traits/validation.raml
Expand Down
2 changes: 0 additions & 2 deletions ramls/fixed-due-date-schedule.raml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ types:
parameters: !include raml-util/schemas/parameters.schema

traits:
language: !include raml-util/traits/language.raml
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
validate: !include raml-util/traits/validation.raml
Expand Down Expand Up @@ -49,7 +48,6 @@ resourceTypes:
501:
description: "Not implemented yet"
delete:
is: [language]
responses:
204:
description: "All fixed due date schedules deleted"
Expand Down
2 changes: 0 additions & 2 deletions ramls/loan-policy-storage.raml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ types:
errors: !include raml-util/schemas/errors.schema

traits:
language: !include raml-util/traits/language.raml
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
validate: !include raml-util/traits/validation.raml
Expand Down Expand Up @@ -46,7 +45,6 @@ resourceTypes:
501:
description: "Not implemented yet"
delete:
is: [language]
responses:
204:
description: "All loans deleted"
Expand Down
2 changes: 0 additions & 2 deletions ramls/loan-storage.raml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ types:
anonymize-loans-request: !include anonymize-storage-loans-request.json

traits:
language: !include raml-util/traits/language.raml
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
validate: !include raml-util/traits/validation.raml
Expand Down Expand Up @@ -49,7 +48,6 @@ resourceTypes:
post:
is: [validate]
delete:
is: [language]
responses:
204:
description: "All loans deleted"
Expand Down
1 change: 0 additions & 1 deletion ramls/patron-action-session.raml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ types:
traits:
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
language: !include raml-util/traits/language.raml
validate: !include raml-util/traits/validation.raml

resourceTypes:
Expand Down
2 changes: 1 addition & 1 deletion ramls/raml-util
Submodule raml-util updated 38 files
+89 −0 .github/workflows/api-doc.yml
+59 −0 .github/workflows/api-lint.yml
+40 −0 .github/workflows/api-schema-lint.yml
+0 −65 Jenkinsfile
+1 −2 README.md
+0 −169 examples/mod-users/userdata.json.sample
+0 −53 examples/mod-users/users.raml.sample
+0 −23 examples/tagged-record-example/user.sample
+0 −3 ramls/codex/codex-instances-sources.raml
+0 −1 ramls/codex/codex-packages.raml
+0 −1 ramls/codex/codex.raml
+1 −2 ramls/jsonSchemas.raml
+1 −2 ramls/ramls.raml
+0 −53 ramls/tagged-record-example/users.raml
+0 −1 rtypes/attachments.raml
+0 −1 rtypes/collection-get-with-json-response.raml
+0 −1 rtypes/collection-get.raml
+1 −2 rtypes/collection-stream.raml
+0 −1 rtypes/collection-with-json-response.raml
+0 −1 rtypes/collection.raml
+0 −1 rtypes/get-delete-with-json-response.raml
+0 −1 rtypes/get-delete.raml
+0 −1 rtypes/get-only-with-json-response.raml
+0 −1 rtypes/get-only.raml
+0 −1 rtypes/item-collection-get-with-json-response.raml
+0 −1 rtypes/item-collection-get.raml
+5 −1 rtypes/item-collection-with-json-response.raml
+0 −1 rtypes/item-collection.raml
+0 −1 rtypes/post-empty-body.raml
+1 −0 schemas/codex/codex_instance_cqlschema-ext.json
+1 −0 schemas/codex/codex_instance_cqlschema.json
+1 −0 schemas/codex/codex_package_cqlschema-ext.json
+1 −0 schemas/codex/codex_package_cqlschema.json
+3 −1 schemas/codex/packageType.json
+2 −2 schemas/codex/source.json
+1 −1 schemas/resultInfo.schema
+0 −9 traits/language.raml
+9 −1 traits/pageable.raml
2 changes: 0 additions & 2 deletions ramls/request-policy-storage.raml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ types:
errors: !include raml-util/schemas/errors.schema

traits:
language: !include raml-util/traits/language.raml
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml

Expand Down Expand Up @@ -62,7 +61,6 @@ resourceTypes:
text/plain:
example: "Internal server error, contact administrator"
delete:
is: [language]
responses:
204:
description: "All request policies deleted"
Expand Down
1 change: 0 additions & 1 deletion ramls/request-preference-storage.raml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ types:
errors: !include raml-util/schemas/errors.schema

traits:
language: !include raml-util/traits/language.raml
validate: !include raml-util/traits/validation.raml
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
Expand Down
2 changes: 0 additions & 2 deletions ramls/request-storage.raml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ types:
parameters: !include raml-util/schemas/parameters.schema

traits:
language: !include raml-util/traits/language.raml
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
validate: !include raml-util/traits/validation.raml
Expand Down Expand Up @@ -47,7 +46,6 @@ resourceTypes:
501:
description: "Not implemented yet"
delete:
is: [language]
responses:
204:
description: "All requests deleted"
Expand Down
1 change: 0 additions & 1 deletion ramls/scheduled-notice-storage.raml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ types:
parameters: !include raml-util/schemas/parameters.schema

traits:
language: !include raml-util/traits/language.raml
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
validate: !include raml-util/traits/validation.raml
Expand Down
2 changes: 0 additions & 2 deletions ramls/staff-slips.raml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ types:
parameters: !include raml-util/schemas/parameters.schema

traits:
language: !include raml-util/traits/language.raml
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
validate: !include raml-util/traits/validation.raml
Expand Down Expand Up @@ -46,7 +45,6 @@ resourceTypes:
501:
description: "Not implemented yet"
delete:
is: [language]
responses:
500:
description: "Internal server error, e.g. due to misconfiguration"
Expand Down
2 changes: 0 additions & 2 deletions ramls/tlr-feature-toggle-job.raml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ types:
kvConfiguration: !include kv-configuration.json

traits:
language: !include raml-util/traits/language.raml
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
validate: !include raml-util/traits/validation.raml
Expand Down Expand Up @@ -57,7 +56,6 @@ resourceTypes:
is: [validate]
delete:
description: "Removes TLR feature toggle job"
is: [language]
/tlr-feature-toggle-job/start:
post:
responses:
Expand Down
18 changes: 9 additions & 9 deletions src/main/java/org/folio/rest/impl/ActualCostRecordAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@

public class ActualCostRecordAPI implements ActualCostRecordStorage {

public void getActualCostRecordStorageActualCostRecords(int offset, int limit, String query,
String lang, Map<String, String> okapiHeaders, Handler<AsyncResult<Response>> asyncResultHandler,
Context vertxContext) {
public void getActualCostRecordStorageActualCostRecords(String totalRecords, int offset,
int limit, String query, Map<String, String> okapiHeaders,
Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {

PgUtil.get(ACTUAL_COST_RECORD_TABLE, ACTUAL_COST_RECORD_CLASS, ActualCostRecords.class,
query, offset, limit, okapiHeaders, vertxContext,
GetActualCostRecordStorageActualCostRecordsResponse.class, asyncResultHandler);
}

public void postActualCostRecordStorageActualCostRecords(String lang, ActualCostRecord entity,
public void postActualCostRecordStorageActualCostRecords(ActualCostRecord entity,
Map<String, String> okapiHeaders, Handler<AsyncResult<Response>> asyncResultHandler,
Context vertxContext) {

PgUtil.post(ACTUAL_COST_RECORD_TABLE, entity, okapiHeaders, vertxContext,
PostActualCostRecordStorageActualCostRecordsResponse.class, asyncResultHandler);
}

public void getActualCostRecordStorageActualCostRecordsById(String id, String lang,
public void getActualCostRecordStorageActualCostRecordsById(String id,
Map<String, String> okapiHeaders, Handler<AsyncResult<Response>> asyncResultHandler,
Context vertxContext) {

Expand All @@ -43,16 +43,16 @@ public void getActualCostRecordStorageActualCostRecordsById(String id, String la
asyncResultHandler);
}

public void putActualCostRecordStorageActualCostRecordsById(String id, String lang,
ActualCostRecord entity, Map<String, String> okapiHeaders,
Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {
public void putActualCostRecordStorageActualCostRecordsById(String id, ActualCostRecord entity,
Map<String, String> okapiHeaders, Handler<AsyncResult<Response>> asyncResultHandler,
Context vertxContext) {

PgUtil.put(ACTUAL_COST_RECORD_TABLE, entity, id, okapiHeaders,
vertxContext, PutActualCostRecordStorageActualCostRecordsByIdResponse.class,
asyncResultHandler);
}

public void deleteActualCostRecordStorageActualCostRecordsById(String id, String lang,
public void deleteActualCostRecordStorageActualCostRecordsById(String id,
Map<String, String> okapiHeaders, Handler<AsyncResult<Response>> asyncResultHandler,
Context vertxContext) {

Expand Down
35 changes: 18 additions & 17 deletions src/main/java/org/folio/rest/impl/CancellationReasonsAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@ private String getErrorResponse(String response) {

@Override
@Validate
public void deleteCancellationReasonStorageCancellationReasons(String lang,
Map<String, String> okapiHeaders,
Handler<AsyncResult<Response>> asyncResultHandler,
Context vertxContext) {
public void deleteCancellationReasonStorageCancellationReasons(Map<String, String> okapiHeaders,
Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {
try {
String tenantId = okapiHeaders.get(TENANT_HEADER);
String deleteAllQuery = String.format("DELETE FROM %s_%s.%s", tenantId,
Expand Down Expand Up @@ -74,48 +72,51 @@ public void deleteCancellationReasonStorageCancellationReasons(String lang,

@Override
@Validate
public void getCancellationReasonStorageCancellationReasons(int offset,
int limit, String query, String lang, Map<String, String> okapiHeaders,
Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {
public void getCancellationReasonStorageCancellationReasons(String totalRecords, int offset,
int limit, String query, Map<String, String> okapiHeaders,
Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {

PgUtil.get(TABLE_NAME, CancellationReason.class, CancellationReasons.class,
query, offset, limit, okapiHeaders, vertxContext,
GetCancellationReasonStorageCancellationReasonsResponse.class, asyncResultHandler);
}

@Override
@Validate
public void postCancellationReasonStorageCancellationReasons(String lang,
CancellationReason entity, Map<String, String> okapiHeaders,
Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {
public void postCancellationReasonStorageCancellationReasons(CancellationReason entity,
Map<String, String> okapiHeaders, Handler<AsyncResult<Response>> asyncResultHandler,
Context vertxContext) {

PgUtil.post(TABLE_NAME, entity, okapiHeaders, vertxContext,
PostCancellationReasonStorageCancellationReasonsResponse.class, asyncResultHandler);
}

@Override
@Validate
public void getCancellationReasonStorageCancellationReasonsByCancellationReasonId(
String cancellationReasonId, String lang, Map<String, String> okapiHeaders,
String cancellationReasonId, Map<String, String> okapiHeaders,
Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {

PgUtil.getById(TABLE_NAME, CancellationReason.class, cancellationReasonId, okapiHeaders, vertxContext,
GetCancellationReasonStorageCancellationReasonsByCancellationReasonIdResponse.class, asyncResultHandler);
}

@Override
@Validate
public void deleteCancellationReasonStorageCancellationReasonsByCancellationReasonId(
String cancellationReasonId, String lang, Map<String, String> okapiHeaders,
Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {
String cancellationReasonId, Map<String, String> okapiHeaders,
Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {

PgUtil.deleteById(TABLE_NAME, cancellationReasonId, okapiHeaders, vertxContext,
DeleteCancellationReasonStorageCancellationReasonsByCancellationReasonIdResponse.class, asyncResultHandler);
}

@Override
@Validate
public void putCancellationReasonStorageCancellationReasonsByCancellationReasonId(
String cancellationReasonId, String lang, CancellationReason entity,
Map<String, String> okapiHeaders,
Handler<AsyncResult<Response>> asyncResultHandler,
Context vertxContext) {
String cancellationReasonId, CancellationReason entity, Map<String, String> okapiHeaders,
Handler<AsyncResult<Response>> asyncResultHandler, Context vertxContext) {

PgUtil.put(TABLE_NAME, entity, cancellationReasonId, okapiHeaders, vertxContext,
PutCancellationReasonStorageCancellationReasonsByCancellationReasonIdResponse.class, asyncResultHandler);
}
Expand Down
Loading

0 comments on commit f9371d6

Please sign in to comment.