Skip to content

Commit 96cd821

Browse files
authored
Merge pull request #231 from kit-data-manager/development
PR for next release
2 parents 445b210 + 14479e6 commit 96cd821

File tree

4 files changed

+40
-13
lines changed

4 files changed

+40
-13
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
/lib/
88
/bin/
99
**/application.properties
10+
**/.DS_Store

CHANGELOG.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,26 @@ Fixed
1414

1515
Security
1616

17+
## [1.5.5] - 2024-04-22
18+
Added
19+
* Added new search endpoint '/api/v1/{index}/_search' to match default Elastic endpoints
20+
21+
Fixed
22+
* Fixed accessibility of Swagger-UI ([#229](https://github.com/kit-data-manager/base-repo/issues/229))
23+
* Fixed issue with internal authentication using JWT ([#261](https://github.com/kit-data-manager/service-base/pull/261))
24+
25+
Security
26+
* Bump org.springframework.boot to 3.2.4
27+
* Bump org.owasp.dependencycheck to 9.1.0
28+
* Bump postgresql to 42.7.3
29+
* Bump spring-messaging to 6.1.6
30+
* Bump spring-data-elasticsearch to 5.2.5
31+
* Bump spring-boot-admin-starter-client to 3.2.3
32+
* Bump spring-cloud-gateway-mvc to 4.1.2
33+
* Bump spring-cloud-starter-config to 4.1.1
34+
* Bump spring-cloud-starter-netflix-eureka-client to 4.1.1
35+
* Bump service-base to 1.3.1
36+
1737
## [1.5.4] - 2024-04-03
1838
Added
1939
* Allow builds outside Git repository, e.g., when building from release packages
@@ -243,7 +263,8 @@ Added
243263

244264
- First public version
245265

246-
[Unreleased]: https://github.com/kit-data-manager/base-repo/compare/v1.5.4...HEAD
266+
[Unreleased]: https://github.com/kit-data-manager/base-repo/compare/v1.5.5...HEAD
267+
[1.5.5]: https://github.com/kit-data-manager/base-repo/compare/v1.5.4...v1.5.5
247268
[1.5.4]: https://github.com/kit-data-manager/base-repo/compare/v1.5.3...v1.5.4
248269
[1.5.3]: https://github.com/kit-data-manager/base-repo/compare/v1.5.2...v1.5.3
249270
[1.5.2]: https://github.com/kit-data-manager/base-repo/compare/v1.5.1...v1.5.2

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ repositories {
3030
ext {
3131
set('javersVersion', "7.3.7")
3232
set('springBootVersion', "3.2.1")
33-
set('springDocVersion', "2.3.0")
33+
set('springDocVersion', "2.5.0")
3434
set('keycloakVersion', "19.0.0")
3535

3636
// directory for generated code snippets during tests
@@ -60,9 +60,9 @@ dependencies {
6060
implementation "org.springframework.boot:spring-boot-starter-mail"
6161
implementation "org.springframework.boot:spring-boot-starter-security"
6262
implementation "org.springframework.boot:spring-boot-starter-actuator"
63-
implementation 'org.springframework.data:spring-data-elasticsearch:5.2.4'
63+
implementation 'org.springframework.data:spring-data-elasticsearch:5.2.5'
6464

65-
implementation "org.springframework:spring-messaging:6.1.5"
65+
implementation "org.springframework:spring-messaging:6.1.6"
6666

6767
// cloud support
6868
implementation "org.springframework.cloud:spring-cloud-starter-config:4.1.1"
@@ -76,7 +76,7 @@ dependencies {
7676
implementation "org.springdoc:springdoc-openapi-starter-webmvc-api:${springDocVersion}"
7777

7878
implementation "edu.kit.datamanager:repo-core:1.2.2"
79-
implementation "edu.kit.datamanager:service-base:1.2.1"
79+
implementation "edu.kit.datamanager:service-base:1.3.1"
8080

8181
//implementation "com.github.victools:jsonschema-generator:4.23.0"
8282

src/test/java/edu/kit/datamanager/repo/test/integration/DataResourceControllerTest.java

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,14 @@
6868
import org.junit.Test;
6969
import org.junit.runner.RunWith;
7070
import org.springframework.beans.factory.annotation.Autowired;
71-
import org.springframework.boot.test.autoconfigure.restdocs.RestDocsMockMvcConfigurationCustomizer;
7271
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
7372
import org.springframework.boot.test.context.SpringBootTest;
74-
import org.springframework.boot.test.context.TestConfiguration;
75-
import org.springframework.context.annotation.Bean;
7673
import org.springframework.data.domain.PageRequest;
7774
import org.springframework.http.HttpHeaders;
7875
import org.springframework.http.MediaType;
7976
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
8077
import org.springframework.mock.web.MockHttpServletResponse;
8178
import org.springframework.mock.web.MockMultipartFile;
82-
import org.springframework.restdocs.mockmvc.MockMvcRestDocumentationConfigurer;
83-
import org.springframework.restdocs.templates.TemplateFormats;
8479
import org.springframework.security.test.context.support.WithSecurityContextTestExecutionListener;
8580
import org.springframework.test.context.ActiveProfiles;
8681
import org.springframework.test.context.TestExecutionListeners;
@@ -146,7 +141,7 @@ public class DataResourceControllerTest {
146141
private DataResource otherResource;
147142
private DataResource revokedResource;
148143
private DataResource fixedResource;
149-
144+
150145
@Before
151146
public void setUp() throws JsonProcessingException {
152147
contentInformationAuditService = repositoryConfig.getContentInformationAuditService();
@@ -1793,10 +1788,10 @@ public void testCreateGetDeleteOfContentWithVersion() throws Exception {
17931788
this.mockMvc.perform(get("/api/v1/audit/" + resourceId + "/data/file.txt").header(HttpHeaders.AUTHORIZATION,
17941789
"Bearer " + userToken).header(HttpHeaders.ACCEPT, "application/vnd.datamanager.audit+json")).andDo(print()).andExpect(status().isOk()).andExpect(MockMvcResultMatchers.header().exists("Resource-Version")).andExpect(MockMvcResultMatchers.header().string("Resource-Version", "2"));
17951790

1796-
//get ETag
1791+
//get ETag
17971792
etag = this.mockMvc.perform(get("/api/v1/dataresources/" + resourceId + "/data/file.txt").header(HttpHeaders.AUTHORIZATION,
17981793
"Bearer " + userToken).header(HttpHeaders.ACCEPT, "application/vnd.datamanager.content-information+json")).andDo(print()).andExpect(status().isOk()).andExpect(MockMvcResultMatchers.jsonPath("$.tags[0]").value("success")).andReturn().getResponse().getHeader("ETag");
1799-
1794+
18001795
//delete content
18011796
this.mockMvc.perform(delete("/api/v1/dataresources/" + resourceId + "/data/file.txt").header(HttpHeaders.AUTHORIZATION,
18021797
"Bearer " + userToken).header("If-Match", etag).header(HttpHeaders.ACCEPT, "application/vnd.datamanager.content-information+json")).andDo(print()).andExpect(status().isNoContent());
@@ -1808,6 +1803,16 @@ public void testCreateGetDeleteOfContentWithVersion() throws Exception {
18081803
"Bearer " + userToken).header(HttpHeaders.ACCEPT, "application/vnd.datamanager.content-information+json")).andDo(print()).andExpect(status().isNotFound());
18091804
}
18101805

1806+
@Test
1807+
public void testSwaggerUI() throws Exception {
1808+
1809+
// Test for swagger definition
1810+
this.mockMvc.perform(get("/v3/api-docs"))
1811+
.andDo(print())
1812+
.andExpect(status().isOk())
1813+
.andExpect(MockMvcResultMatchers.jsonPath("$.info.title", Matchers.startsWith("Repository")));
1814+
}
1815+
18111816
// @Test
18121817
// public void testObtainHealthInformation() throws Exception{
18131818
// this.mockMvc.perform(get("/actuator/health")).andDo(print()).andExpect(status().isOk()).andExpect(MockMvcResultMatchers.jsonPath("$.status").value("UP"));

0 commit comments

Comments
 (0)