diff --git a/pom.xml b/pom.xml
index fa4fd3d78..a5dbdc63f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -58,9 +58,9 @@
1.23.0
4.5
3.3.1
+ 2
3.3.1
-
-
+ ${surefire.rerunFailingTestsCount}
diff --git a/schema/openapi.yaml b/schema/openapi.yaml
index 4f3fc32b3..d8b24ed8c 100644
--- a/schema/openapi.yaml
+++ b/schema/openapi.yaml
@@ -16,13 +16,13 @@ components:
Annotations:
properties:
cryostat:
- items:
- $ref: '#/components/schemas/KeyValue'
- type: array
+ additionalProperties:
+ type: string
+ type: object
platform:
- items:
- $ref: '#/components/schemas/KeyValue'
- type: array
+ additionalProperties:
+ type: string
+ type: object
type: object
ArchivedRecording:
properties:
@@ -66,9 +66,9 @@ components:
format: int64
type: integer
labels:
- items:
- $ref: '#/components/schemas/KeyValue'
- type: array
+ additionalProperties:
+ type: string
+ type: object
name:
pattern: \S
type: string
@@ -125,13 +125,6 @@ components:
value: {}
type: object
type: array
- KeyValue:
- properties:
- key:
- type: string
- value:
- type: string
- type: object
LinkedRecordingDescriptor:
properties:
continuous:
@@ -320,9 +313,9 @@ components:
jvmId:
type: string
labels:
- items:
- $ref: '#/components/schemas/KeyValue'
- type: array
+ additionalProperties:
+ type: string
+ type: object
required:
- connectUrl
- alias
diff --git a/schema/schema.graphql b/schema/schema.graphql
index c865733d3..a3b06cc12 100644
--- a/schema/schema.graphql
+++ b/schema/schema.graphql
@@ -86,11 +86,6 @@ type Entry_String_String {
value: String
}
-type KeyValue {
- key: String
- value: String
-}
-
type MBeanMetrics {
jvmId: String
memory: MemoryMetrics
diff --git a/src/main/java/io/cryostat/ObjectMapperCustomization.java b/src/main/java/io/cryostat/ObjectMapperCustomization.java
new file mode 100644
index 000000000..7284b0282
--- /dev/null
+++ b/src/main/java/io/cryostat/ObjectMapperCustomization.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright The Cryostat Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.cryostat;
+
+import java.io.IOException;
+import java.util.Map;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.Version;
+import com.fasterxml.jackson.databind.BeanDescription;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationConfig;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import com.fasterxml.jackson.databind.ser.BeanSerializerModifier;
+import com.fasterxml.jackson.databind.type.MapType;
+import io.quarkus.jackson.ObjectMapperCustomizer;
+import jakarta.inject.Singleton;
+
+@Singleton
+public class ObjectMapperCustomization implements ObjectMapperCustomizer {
+
+ @Override
+ public void customize(ObjectMapper objectMapper) {
+ // FIXME get this version information from the maven build somehow
+ SimpleModule mapModule =
+ new SimpleModule(
+ "MapSerialization", new Version(3, 0, 0, null, "io.cryostat", "cryostat"));
+
+ mapModule.setSerializerModifier(new MapSerializerModifier());
+
+ objectMapper.registerModule(mapModule);
+ }
+
+ static class MapSerializerModifier extends BeanSerializerModifier {
+ @Override
+ public JsonSerializer> modifyMapSerializer(
+ SerializationConfig config,
+ MapType valueType,
+ BeanDescription beanDesc,
+ JsonSerializer serializer) {
+ if (valueType.getKeyType().getRawClass().equals(String.class)
+ && valueType.getContentType().getRawClass().equals(String.class)) {
+ return new MapSerializer();
+ }
+ return serializer;
+ }
+ }
+
+ static class MapSerializer extends JsonSerializer