Skip to content

Commit

Permalink
Merge pull request #501 from kit-data-manager/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
VolkerHartmann committed Apr 19, 2024
2 parents 91f6ace + aec61e4 commit d6cfc1d
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RABBIT_MQ_PASSWORD=rabbitpasswd
# Only edit the following lines if you
# want to update service versions.
########################################
METASTORE_VERSION=v1.4.2
METASTORE_VERSION=v1.4.3
FRONTEND_COLLECTION_VERSION=metastore-v1.0.1
INDEXING_SERVICE_VERSION=v1.0.1
ELASTICSEARCH_VERSION=8.11.1
Expand Down
19 changes: 17 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

## [1.4.3] - 2024-04-19

### Deprecated
- Search API of Metadata Management Controller

### Fixed
- Fix bug while authentication via keycloak

### Libs
- Bump edu.kit.datamanager:service-base from 1.3.0 to 1.3.1
- Bump org.apache.commons:commons-text from 1.11.0 to 1.12.0
- Bump org.springframework.boot from 3.2.4 to 3.2.5
- Bump org.springframework.cloud:spring-cloud-gateway-mvc from 4.1.2 to 4.1.3

## [1.4.2] - 2024-04-12
### Security

Expand Down Expand Up @@ -447,8 +461,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Registry for XSD files and support for XML metadata

[Unreleased]: https://github.com/kit-data-manager/metastore2/compare/v1.4.2...HEAD
[1.4.2]: https://github.com/kit-data-manager/metastore2/compare/v1.4.1...1.4.2
[Unreleased]: https://github.com/kit-data-manager/metastore2/compare/v1.4.3...HEAD
[1.4.3]: https://github.com/kit-data-manager/metastore2/compare/v1.4.2...v1.4.3
[1.4.2]: https://github.com/kit-data-manager/metastore2/compare/v1.4.1...v1.4.2
[1.4.1]: https://github.com/kit-data-manager/metastore2/compare/v1.4.0...v1.4.1
[1.4.0]: https://github.com/kit-data-manager/metastore2/compare/v1.3.0...v1.4.0
[1.3.0]: https://github.com/kit-data-manager/metastore2/compare/v1.2.3...v1.3.0
Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'org.springframework.boot' version '3.2.4'
id 'org.springframework.boot' version '3.2.5'
id 'io.spring.dependency-management' version '1.1.4'
id 'io.freefair.lombok' version '8.6'
id 'io.freefair.maven-publish-java' version '8.6'
Expand Down Expand Up @@ -50,7 +50,7 @@ if (System.getProperty('profile') == 'minimal') {
dependencies {
// Spring
implementation 'org.springframework:spring-messaging:6.1.1'
implementation 'org.springframework.cloud:spring-cloud-gateway-mvc:4.1.2'
implementation 'org.springframework.cloud:spring-cloud-gateway-mvc:4.1.3'

// Spring Boot
implementation "org.springframework.boot:spring-boot-starter-data-rest"
Expand Down Expand Up @@ -84,7 +84,7 @@ dependencies {
implementation "commons-configuration:commons-configuration:1.10"
implementation "org.apache.commons:commons-collections4:4.4"
// includes commons-lang3
implementation "org.apache.commons:commons-text:1.11.0"
implementation "org.apache.commons:commons-text:1.12.0"

// UI (website)
implementation "org.springframework.boot:spring-boot-starter-thymeleaf"
Expand All @@ -110,10 +110,10 @@ dependencies {

// datamanager
implementation "edu.kit.datamanager:repo-core:1.2.2"
implementation "edu.kit.datamanager:service-base:1.3.0"
implementation "edu.kit.datamanager:service-base:1.3.1"

// elasticsearch (since service-base 1.1.0)
implementation "org.springframework.data:spring-data-elasticsearch:5.2.4"
implementation "org.springframework.data:spring-data-elasticsearch:5.2.5"

// DOIP SDK
implementation "net.dona.doip:doip-sdk:2.2.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
@RequestMapping(value = "/api/v1/metadata")
@Tag(name = "Metadata Repository")
@Schema(description = "Metadata Resource Management")
@Deprecated(since = "1.4.2", forRemoval = true)
public class MetadataSearchController {

private static final Logger LOG = LoggerFactory.getLogger(MetadataSearchController.class);
Expand All @@ -68,8 +69,10 @@ public MetadataSearchController(SearchConfiguration searchConfiguration) {
}

@PostMapping("/{schemaId}/search")
@Operation(summary = "Search for metadata document/records",
description = "Search for metadata document/records using the configured Elastic backend. "
@Operation(deprecated = true,
summary = "Search for metadata document/records",
description = "Use '/api/v1/{index}/_search' instead!"
+ "Search for metadata document/records using the configured Elastic backend. "
+ "This endpoint serves as direct proxy to the RESTful endpoint of Elastic. "
+ "In the body, a query document following the Elastic query format has to be provided. "
+ "Format errors are returned directly from Elastic. "
Expand All @@ -87,8 +90,19 @@ public MetadataSearchController(SearchConfiguration searchConfiguration) {
})
@ResponseBody
@PageableAsQueryParam
/**
* Proxy for elasticsearch.
*
* @deprecation Please use SearchController instead!
* @param body query
* @param schemaIds schemaIds which should be used for search (prefix with 'metastore-')
* @param proxy set by Spring Boot
* @param pgbl page information
* @return Prepared query with post filter for authorization.
*
*/
public ResponseEntity<?> proxy(@RequestBody JsonNode body,
@Parameter(description = "Contains all schemaIds "
@Parameter(description = "Contains all schemaIds prefixed with 'metastore-'"
+ "to which the records refer as comma-separated values. "
+ "Regular expressions are also allowed. "
+ "See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/multi-index.html", required = true) @PathVariable(value = "schemaId") String schemaIds,
Expand All @@ -103,8 +117,10 @@ public ResponseEntity<?> proxy(@RequestBody JsonNode body,
}

@PostMapping("/search")
@Operation(summary = "Search for metadata document/records",
description = "Search for metadata document/records using the configured Elastic backend. "
@Operation(deprecated = true,
summary = "Search for metadata document/records",
description = "Use '/api/v1/{index}/_search' instead!"
+ "Search for metadata document/records using the configured Elastic backend. "
+ "This endpoint serves as direct proxy to the RESTful endpoint of Elastic. "
+ "In the body, a query document following the Elastic query format has to be provided. "
+ "Format errors are returned directly from Elastic. "
Expand All @@ -122,6 +138,16 @@ public ResponseEntity<?> proxy(@RequestBody JsonNode body,
})
@ResponseBody
@PageableAsQueryParam
/**
* Proxy for elasticsearch.
*
* @deprecation Please use SearchController instead!
* @param body query
* @param proxy set by Spring Boot
* @param pgbl page information
* @return Search result.
*
*/
public ResponseEntity<?> proxy(@RequestBody JsonNode body,
ProxyExchange<JsonNode> proxy,
@Parameter(hidden = true) final Pageable pgbl) throws Exception {
Expand Down

0 comments on commit d6cfc1d

Please sign in to comment.