http-get endpoints for partner, debitor and memberhip-number #135

Merged
2 changed files with 16 additions and 1 deletions
Showing only changes of commit 0214fe9095 - Show all commits

View File

@ -17,10 +17,11 @@ public class WebSecurityConfig {
return http
.authorizeHttpRequests(authorize -> authorize
.requestMatchers("/api/**").permitAll() // TODO.impl: implement authentication
.requestMatchers("/swagger-ui/**").permitAll()
.requestMatchers("/v3/api-docs/**").permitAll()
.requestMatchers("/actuator/**").permitAll()
.anyRequest().authenticated()
)
.build();
}
}

View File

@ -42,6 +42,20 @@ class WebSecurityConfigIntegrationTest {
assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
}
@Test
public void shouldSupportSwaggerUi() {
final var result = this.restTemplate.getForEntity(
"http://localhost:" + this.managementPort + "/swagger-ui/index.html", String.class);
assertThat(result.getStatusCode()).isEqualTo(HttpStatus.OK);
}
@Test
public void shouldSupportApiDocs() {
final var result = this.restTemplate.getForEntity(
"http://localhost:" + this.managementPort + "/v3/api-docs/swagger-config", String.class);
assertThat(result.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND); // permitted but not configured
}
@Test
public void shouldSupportHealthEndpoint() {
final var result = this.restTemplate.getForEntity(