Branch: refs/heads/main Home: https://github.com/xwiki-contrib/ai-llm Commit: bff3ad6e0fe2844292a4113af62c2168ab27f471 https://github.com/xwiki-contrib/ai-llm/commit/bff3ad6e0fe2844292a4113af62c2... Author: Michael Hamann <michael.hamann@xwiki.com> Date: 2026-03-18 (Wed, 18 Mar 2026) Changed paths: M application-ai-llm-index/application-ai-llm-index-api/src/main/java/org/xwiki/contrib/llm/internal/rest/DefaultSearchCollectionsResource.java M application-ai-llm-index/application-ai-llm-index-api/src/main/java/org/xwiki/contrib/llm/rest/JSONCollection.java M application-ai-llm-index/application-ai-llm-index-api/src/main/java/org/xwiki/contrib/llm/rest/SearchCollectionsResource.java Log Message: ----------- LLMAI-130: Expose search context via the REST API * Return `JSONCollection` objects instead of plain strings from the search collections endpoint, populating only `id` and `title` to allow displaying the pretty name in UIs while avoiding the disclosure of internal configuration details. * Add `@JsonInclude(NON_NULL)` to `JSONCollection` so only non-null fields are serialized to JSON. * Box primitive fields (`int` → `Integer`, `boolean` → `Boolean`) in `JSONCollection` to make them nullable. While this could be considered a breakage, it actually leads to a much more consistent behavior of the REST API when the fields are omitted in PUT requests. * Update `applyChunkingMaxSize`, `applyChunkingOverlapOffset`, and `applyAllowGuests` to null-check instead of zero/false-check. * Fix bug in `JSONCollection.getTitle()` which was returning `this.id` instead of `this.title`. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Commit: 8c65b54f591a334aa82fca13b61d834640b233db https://github.com/xwiki-contrib/ai-llm/commit/8c65b54f591a334aa82fca13b61d8... Author: Michael Hamann <michael.hamann@xwiki.com> Date: 2026-03-18 (Wed, 18 Mar 2026) Changed paths: M application-ai-llm-index/application-ai-llm-index-api/src/main/java/org/xwiki/contrib/llm/internal/authorization/XWikiAuthorizationManagerBuilder.java M application-ai-llm-index/application-ai-llm-index-api/src/main/java/org/xwiki/contrib/llm/rest/JSONCollection.java A application-ai-llm-index/application-ai-llm-index-api/src/test/java/org/xwiki/contrib/llm/internal/authorization/XWikiAuthorizationManagerBuilderTest.java M application-ai-llm-index/application-ai-llm-index-api/src/test/java/org/xwiki/contrib/llm/internal/rest/DefaultCollectionResourceTest.java Log Message: ----------- LLMAI-133: PUT collection REST API returns 500 when rights check method configuration is omitted from request body * Guard the authorization configuration block in `JSONCollection.applyTo()` with a null-check on `this.rightsCheckMethodConfiguration` so a partial PUT that omits that field no longer tries to deserialize null into the configuration type. * Add regression test `putCollectionPartialUpdateWithExistingRightsCheckMethod` covering this scenario. * Fix `XWikiAuthorizationManagerBuilder.getConfigurationType()` returning `Object.class` instead of `null`: the xwiki builder doesn't have any configuration object. * Add a null-check on `rightsCheckMethodConfiguration` in `JSONCollection.applyTo()` before resolving the configuration type, so partial PUTs that omit `rights_check_method_configuration` no longer fail with a 500 error on collections that have a rights check method set. * Detect when a non-null `rightsCheckMethodConfiguration` is provided in a PUT request but the rights check method returns a `null` configuration type (i.e., it accepts no configuration), and throw a clear `IndexException` instead of an obscure type-mismatch error. * Add `XWikiAuthorizationManagerBuilderTest` covering the corrected `getConfigurationType()`, `getConfiguration()`, and `setConfiguration()` behaviour. * Add regression test `putCollectionConfigurationForMethodWithoutConfiguration` verifying that supplying `rights_check_method_configuration` for a method that does not accept any configuration yields HTTP 500 with an informative log message. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Compare: https://github.com/xwiki-contrib/ai-llm/compare/506564768ce9...8c65b54f591a To unsubscribe from these emails, change your notification settings at https://github.com/xwiki-contrib/ai-llm/settings/notifications