Skip to content

Commit d14a8dc

Browse files
committed
swagger: Fix supported types of TimeGraphEntry metadata values
fixes eclipse-cdt-cloud/trace-server-protocol#129 Signed-off-by: Bernd Hufmann <[email protected]>
1 parent cd12f49 commit d14a8dc

File tree

1 file changed

+11
-3
lines changed
  • trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core/src/org/eclipse/tracecompass/incubator/internal/trace/server/jersey/rest/core/model

1 file changed

+11
-3
lines changed

trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core/src/org/eclipse/tracecompass/incubator/internal/trace/server/jersey/rest/core/model/TimeGraphEntry.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,15 @@ public interface TimeGraphEntry {
3737
/**
3838
* @return The entry's metadata map.
3939
*/
40-
@Schema(description = "Optional metadata map for domain specific data for matching data across data providers. Keys for the same data shall be the same across data providers. "
41-
+ "Only values of type Number or String are allowed. For each key all values shall have the same type.")
42-
Map<String, Collection<Object>> getMetadata();
40+
@Schema(description = "Optional metadata map for domain specific data for matching data across data providers. Keys for the same data shall be the same across data providers."
41+
+ " For each key all values shall have the same type.")
42+
Map<String, Collection<MetadataValue>> getMetadata();
43+
44+
/**
45+
* Type for metadata values (String or Number)
46+
*/
47+
@Schema(description = "Supported types of a metadata value. Only values of type Number or String are allowed.", oneOf = { String.class, Number.class })
48+
interface MetadataValue {
49+
// empty
50+
}
4351
}

0 commit comments

Comments
 (0)