You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2023/12/11 13:38:13 UTC
(streampipes) branch migrate-rest-interfaces-to-spring updated: Fix content types
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch migrate-rest-interfaces-to-spring
in repository https://gitbox.apache.org/repos/asf/streampipes.git
The following commit(s) were added to refs/heads/migrate-rest-interfaces-to-spring by this push:
new 0dc4c244d Fix content types
new 247f44b9c Merge branch 'migrate-rest-interfaces-to-spring' of github.com:apache/streampipes into migrate-rest-interfaces-to-spring
0dc4c244d is described below
commit 0dc4c244dd79c4a2b91e5a754009b600890437ac
Author: Dominik Riemer <do...@gmail.com>
AuthorDate: Mon Dec 11 14:36:55 2023 +0100
Fix content types
---
.../apache/streampipes/rest/impl/PipelineElementAsset.java | 4 ++--
.../rest/impl/admin/GeneralConfigurationResource.java | 3 +--
.../core/minimal/StreamPipesCoreApplicationMinimal.java | 12 ++++++++----
ui/cypress/support/utils/DataDownloadDialogUtils.ts | 1 -
4 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineElementAsset.java b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineElementAsset.java
index 2f1ead7dc..f0d628d7f 100644
--- a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineElementAsset.java
+++ b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/PipelineElementAsset.java
@@ -37,7 +37,7 @@ public class PipelineElementAsset extends AbstractRestResource {
private static final Logger LOG = LoggerFactory.getLogger(PipelineElementAsset.class);
- @GetMapping(path = "/{appId}/assets/icon", produces = "image/png")
+ @GetMapping(path = "/{appId}/assets/icon", produces = MediaType.IMAGE_PNG_VALUE)
public ResponseEntity<?> getIconAsset(@PathVariable("appId") String appId) {
try {
return ok(AssetManager.getAssetIcon(appId));
@@ -55,7 +55,7 @@ public class PipelineElementAsset extends AbstractRestResource {
}
}
- @GetMapping(path = "/{appId}/assets/{assetName}", produces = "image/png")
+ @GetMapping(path = "/{appId}/assets/{assetName}", produces = MediaType.IMAGE_PNG_VALUE)
public ResponseEntity<?> getAsset(@PathVariable("appId") String appId, @PathVariable("assetName") String
assetName) {
try {
diff --git a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/admin/GeneralConfigurationResource.java b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/admin/GeneralConfigurationResource.java
index c988e24b5..723198971 100644
--- a/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/admin/GeneralConfigurationResource.java
+++ b/streampipes-rest/src/main/java/org/apache/streampipes/rest/impl/admin/GeneralConfigurationResource.java
@@ -59,8 +59,7 @@ public class GeneralConfigurationResource extends AbstractAuthGuardedRestResourc
return ok();
}
- // TODO
- @GetMapping(path = "keys", produces = "multipart/mixed")
+ @GetMapping(path = "keys", produces = MediaType.MULTIPART_MIXED_VALUE)
@PreAuthorize(AuthConstants.IS_ADMIN_ROLE)
public ResponseEntity<?> generateKeyPair() throws Exception {
KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA");
diff --git a/streampipes-service-core-minimal/src/main/java/org/apache/streampipes/service/core/minimal/StreamPipesCoreApplicationMinimal.java b/streampipes-service-core-minimal/src/main/java/org/apache/streampipes/service/core/minimal/StreamPipesCoreApplicationMinimal.java
index 9b25a08cf..5272d82d4 100644
--- a/streampipes-service-core-minimal/src/main/java/org/apache/streampipes/service/core/minimal/StreamPipesCoreApplicationMinimal.java
+++ b/streampipes-service-core-minimal/src/main/java/org/apache/streampipes/service/core/minimal/StreamPipesCoreApplicationMinimal.java
@@ -21,8 +21,10 @@ package org.apache.streampipes.service.core.minimal;
import org.apache.streampipes.messaging.mqtt.SpMqttProtocolFactory;
import org.apache.streampipes.messaging.nats.SpNatsProtocolFactory;
import org.apache.streampipes.rest.security.SpPermissionEvaluator;
+import org.apache.streampipes.service.core.OpenApiConfiguration;
import org.apache.streampipes.service.core.StreamPipesCoreApplication;
import org.apache.streampipes.service.core.StreamPipesPasswordEncoder;
+import org.apache.streampipes.service.core.StreamPipesPrometheusConfig;
import org.apache.streampipes.service.core.WebSecurityConfig;
import org.apache.streampipes.service.core.WelcomePageController;
@@ -35,13 +37,15 @@ import java.util.List;
@Configuration
@EnableAutoConfiguration
-@Import({//StreamPipesResourceConfig.class,
- WelcomePageController.class,
+@Import({
+ OpenApiConfiguration.class,
+ SpPermissionEvaluator.class,
StreamPipesPasswordEncoder.class,
+ StreamPipesPrometheusConfig.class,
WebSecurityConfig.class,
- SpPermissionEvaluator.class
+ WelcomePageController.class
})
-@ComponentScan({"org.apache.streampipes.rest.*"})
+@ComponentScan({"org.apache.streampipes.rest.*", "org.apache.streampipes.ps"})
public class StreamPipesCoreApplicationMinimal extends StreamPipesCoreApplication {
public static void main(String[] args) {
diff --git a/ui/cypress/support/utils/DataDownloadDialogUtils.ts b/ui/cypress/support/utils/DataDownloadDialogUtils.ts
index b795269d0..ba8f1ec9b 100644
--- a/ui/cypress/support/utils/DataDownloadDialogUtils.ts
+++ b/ui/cypress/support/utils/DataDownloadDialogUtils.ts
@@ -81,7 +81,6 @@ export class DataDownloadDialogUtils {
cy.readFile(
`cypress/fixtures/dataDownloadDialog/${resultFileLocation}`,
).then(expectedResult => {
- console.log(expectedResult);
// Replace whitespaces on Windows systems
if (typeof expectedResult === 'string') {
expectedResult = expectedResult.replace(/\r/g, '');