From 9142c2a5e9c070046b5d25535b4ea19157a52989 Mon Sep 17 00:00:00 2001 From: Kriti Jain Date: Wed, 5 Nov 2025 14:20:32 -0600 Subject: [PATCH 1/6] MODOAIPMH-621:Migrate settings from mod-configuration to mod-settings --- .../src/main/java/org/folio/rest/impl/ConfigAPI.java | 3 +++ ramls/configuration/config.raml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mod-configuration-server/src/main/java/org/folio/rest/impl/ConfigAPI.java b/mod-configuration-server/src/main/java/org/folio/rest/impl/ConfigAPI.java index d50285d..b0dda85 100644 --- a/mod-configuration-server/src/main/java/org/folio/rest/impl/ConfigAPI.java +++ b/mod-configuration-server/src/main/java/org/folio/rest/impl/ConfigAPI.java @@ -50,6 +50,7 @@ public void getConfigurationsEntries( PgUtil.streamGet(CONFIG_TABLE, Config.class, query, offset, limit, facets, "configs", routingContext, okapiHeaders, context); } + @Deprecated @Validate @Override public void postConfigurationsEntries(String lang, Config entity, RoutingContext routingContext, @@ -103,6 +104,7 @@ public void getConfigurationsEntriesByEntryId(String entryId, String lang, MapokapiHeaders, @@ -112,6 +114,7 @@ public void deleteConfigurationsEntriesByEntryId(String entryId, String lang, Ma DeleteConfigurationsEntriesByEntryIdResponse.class, asyncResultHandler); } + @Deprecated @Validate @Override public void putConfigurationsEntriesByEntryId( diff --git a/ramls/configuration/config.raml b/ramls/configuration/config.raml index 7eb0e81..35adaeb 100644 --- a/ramls/configuration/config.raml +++ b/ramls/configuration/config.raml @@ -49,7 +49,7 @@ resourceTypes: is: [validate] /{entryId}: displayName: Module configurations - description: Get, Delete or Update a specific entry + description: DEPRECATED. Get, Delete or Update a specific entry type: collection-item: schema: config From df294c91ba565af017e798ed5dfc8200280091c1 Mon Sep 17 00:00:00 2001 From: Kriti Jain Date: Wed, 5 Nov 2025 14:36:57 -0600 Subject: [PATCH 2/6] old lint errors decided to show up randomly --- ramls/_schemas/audit.schema | 6 ++++++ ramls/_schemas/audits.schema | 3 +++ ramls/_schemas/kv_configuration.schema | 11 +++++++++++ ramls/_schemas/kv_configurations.schema | 4 ++++ ramls/_schemas/library.schema | 10 ++++++++++ 5 files changed, 34 insertions(+) diff --git a/ramls/_schemas/audit.schema b/ramls/_schemas/audit.schema index f307714..2b29e4c 100644 --- a/ramls/_schemas/audit.schema +++ b/ramls/_schemas/audit.schema @@ -1,17 +1,22 @@ { "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Schema for audit log entries capturing changes to key-value configurations", "type": "object", "properties": { "id": { + "description": "Unique identifier (UUID) for the audit log entry", "type": "string" }, "orig_id": { + "description": "Original identifier (UUID) of the configuration entry being audited", "type": "string" }, "operation": { + "description": "Type of operation performed (e.g., CREATE, UPDATE, DELETE)", "type": "string" }, "jsonb": { + "description": "Snapshot of the configuration data at the time of the operation", "type": "object", "properties": { "content": { @@ -25,6 +30,7 @@ } }, "createdDate": { + "description": "Timestamp when the audit record was created." "type": "string" } } diff --git a/ramls/_schemas/audits.schema b/ramls/_schemas/audits.schema index a207a81..13c7570 100644 --- a/ramls/_schemas/audits.schema +++ b/ramls/_schemas/audits.schema @@ -1,9 +1,11 @@ { "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Schema for a collection of audit log entries", "type": "object", "properties": { "audits": { "id": "auditData", + "description": "Array of audit log entry objects", "type": "array", "items": { "type": "object", @@ -11,6 +13,7 @@ } }, "totalRecords": { + "description": "Total number of audit log records available", "type": "integer" } }, diff --git a/ramls/_schemas/kv_configuration.schema b/ramls/_schemas/kv_configuration.schema index 004ecf3..493d7d5 100644 --- a/ramls/_schemas/kv_configuration.schema +++ b/ramls/_schemas/kv_configuration.schema @@ -1,36 +1,47 @@ { "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Schema for key-value configuration objects used in the system", "type": "object", "properties": { "id": { + "description": "Unique identifier (UUID) for the configuration entry", "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" }, "module": { + description": "Module name this configuration belongs to", "type": "string" }, "configName": { + "description": "Name of the configuration setting","description": "Name of the configuration setting", "type": "string" }, "code": { + "description": "Optional code for the configuration", "type": "string" }, "description": { + "description": "Description of the configuration setting","description": "Description of the configuration entry", "type": "string" }, "default": { + "description": "Indicates if this is the default configuration", "type": "boolean" }, "enabled": { + "description": "Indicates if this configuration is enabled", "type": "boolean" }, "value": { + "description": "Value of the configuration setting", "type": "string" }, "userId": { + "description": "Identifier of the user who created or last modified this configuration", "type": "string" }, "metadata": { + "description": "Metadata about the configuration entry", "$ref": "../raml-util/schemas/metadata.schema", "readonly": true } diff --git a/ramls/_schemas/kv_configurations.schema b/ramls/_schemas/kv_configurations.schema index fe5287d..be32035 100644 --- a/ramls/_schemas/kv_configurations.schema +++ b/ramls/_schemas/kv_configurations.schema @@ -1,9 +1,11 @@ { "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Schema for a collection of key-value configuration objects", "type": "object", "properties": { "configs": { "id": "configurationData", + "description": "Array of key-value configuration objects", "type": "array", "items": { "type": "object", @@ -11,9 +13,11 @@ } }, "totalRecords": { + "description": "Total number of configuration records available", "type": "integer" }, "resultInfo": { + "description": "Information about the result set", "$ref": "../raml-util/schemas/resultInfo.schema", "readonly": true } diff --git a/ramls/_schemas/library.schema b/ramls/_schemas/library.schema index 169b2ad..f165931 100644 --- a/ramls/_schemas/library.schema +++ b/ramls/_schemas/library.schema @@ -1,34 +1,44 @@ { "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Schema for library data objects", "type": "object", "properties": { "library_data": { + "description": "Array of library data objects", "type": "array", "items": { + "description": "Library data object", "type": "object", "properties": { "library_code": { + "description": "Short code representing the library", "type": "string" }, "full_library_code": { + "description": "Full code representing the library", "type": "string" }, "resource_sharing": { + "description": "Indicates if resource sharing is enabled for the library", "type": "boolean" }, "name": { + "description": "Name of the library", "type": "string" }, "description": { + "description": "Description of the library", "type": "string" }, "scope": { + "description": "Scope information for the library", "type": "object", "properties": { "institution_id": { "type": "string" }, "library_id": { + "description": "Unique identifier for the library", "type": "string" } } From c803ae0bc01eea268ea615b5606558a8fa8b77f6 Mon Sep 17 00:00:00 2001 From: Kriti Jain Date: Wed, 5 Nov 2025 14:40:59 -0600 Subject: [PATCH 3/6] fixing lints --- ramls/_schemas/kv_configuration.schema | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ramls/_schemas/kv_configuration.schema b/ramls/_schemas/kv_configuration.schema index 493d7d5..fa25997 100644 --- a/ramls/_schemas/kv_configuration.schema +++ b/ramls/_schemas/kv_configuration.schema @@ -9,7 +9,7 @@ "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" }, "module": { - description": "Module name this configuration belongs to", + "description": "Module name this configuration belongs to", "type": "string" }, "configName": { @@ -37,7 +37,7 @@ "type": "string" }, "userId": { - "description": "Identifier of the user who created or last modified this configuration", + "description": "Identifier of the user who created or last modified this configuration", "type": "string" }, "metadata": { From 84586f0df0fe9251b5d625931be7d537f494c690 Mon Sep 17 00:00:00 2001 From: Kriti Jain Date: Wed, 5 Nov 2025 14:44:28 -0600 Subject: [PATCH 4/6] another round --- ramls/_schemas/audit.schema | 2 +- ramls/_schemas/kv_configuration.schema | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ramls/_schemas/audit.schema b/ramls/_schemas/audit.schema index 2b29e4c..0e30983 100644 --- a/ramls/_schemas/audit.schema +++ b/ramls/_schemas/audit.schema @@ -30,7 +30,7 @@ } }, "createdDate": { - "description": "Timestamp when the audit record was created." + "description": "Timestamp when the audit record was created", "type": "string" } } diff --git a/ramls/_schemas/kv_configuration.schema b/ramls/_schemas/kv_configuration.schema index fa25997..3e8a017 100644 --- a/ramls/_schemas/kv_configuration.schema +++ b/ramls/_schemas/kv_configuration.schema @@ -21,7 +21,7 @@ "type": "string" }, "description": { - "description": "Description of the configuration setting","description": "Description of the configuration entry", + "description": "Description of the configuration setting", "type": "string" }, "default": { From 6b189d864d8aff402080d7121c8d5ad3ddeb797d Mon Sep 17 00:00:00 2001 From: Kriti Jain Date: Wed, 5 Nov 2025 14:46:13 -0600 Subject: [PATCH 5/6] another round --- ramls/_schemas/audit.schema | 1 + ramls/_schemas/library.schema | 1 + 2 files changed, 2 insertions(+) diff --git a/ramls/_schemas/audit.schema b/ramls/_schemas/audit.schema index 0e30983..11be27f 100644 --- a/ramls/_schemas/audit.schema +++ b/ramls/_schemas/audit.schema @@ -21,6 +21,7 @@ "properties": { "content": { "id": "contentData", + "description": "Array of key-value configuration objects representing the state at the time of the audit", "type": "array", "items": { "type": "object", diff --git a/ramls/_schemas/library.schema b/ramls/_schemas/library.schema index f165931..be93559 100644 --- a/ramls/_schemas/library.schema +++ b/ramls/_schemas/library.schema @@ -35,6 +35,7 @@ "type": "object", "properties": { "institution_id": { + "description": "Unique identifier for the institution", "type": "string" }, "library_id": { From 17816ba6a290bee2efbb3e225085732fcc4a8682 Mon Sep 17 00:00:00 2001 From: Kriti Jain Date: Wed, 5 Nov 2025 14:53:16 -0600 Subject: [PATCH 6/6] fixing deprecation --- .../main/java/org/folio/rest/impl/ConfigAPI.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/mod-configuration-server/src/main/java/org/folio/rest/impl/ConfigAPI.java b/mod-configuration-server/src/main/java/org/folio/rest/impl/ConfigAPI.java index b0dda85..250cd31 100644 --- a/mod-configuration-server/src/main/java/org/folio/rest/impl/ConfigAPI.java +++ b/mod-configuration-server/src/main/java/org/folio/rest/impl/ConfigAPI.java @@ -50,7 +50,10 @@ public void getConfigurationsEntries( PgUtil.streamGet(CONFIG_TABLE, Config.class, query, offset, limit, facets, "configs", routingContext, okapiHeaders, context); } - @Deprecated + /** + * @deprecated deprecating this endpoint for the Trillium release. + */ + @Deprecated(since = "Trillium", forRemoval = true) @Validate @Override public void postConfigurationsEntries(String lang, Config entity, RoutingContext routingContext, @@ -104,7 +107,10 @@ public void getConfigurationsEntriesByEntryId(String entryId, String lang, MapokapiHeaders, @@ -114,7 +120,10 @@ public void deleteConfigurationsEntriesByEntryId(String entryId, String lang, Ma DeleteConfigurationsEntriesByEntryIdResponse.class, asyncResultHandler); } - @Deprecated + /** + * @deprecated deprecating this endpoint for the Trillium release. + */ + @Deprecated(since = "Trillium", forRemoval = true) @Validate @Override public void putConfigurationsEntriesByEntryId(