From ae2a663e37d65478bddc321f580302bd4ab66339 Mon Sep 17 00:00:00 2001 From: Bernd Hufmann Date: Fri, 30 Aug 2024 10:23:31 -0400 Subject: [PATCH] swagger: Document schema in TmfConfigurationSourceType Signed-off-by: Bernd Hufmann --- .../core/model/ConfigurationSourceType.java | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core/src/org/eclipse/tracecompass/incubator/internal/trace/server/jersey/rest/core/model/ConfigurationSourceType.java b/trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core/src/org/eclipse/tracecompass/incubator/internal/trace/server/jersey/rest/core/model/ConfigurationSourceType.java index 27f2636c2..181b2502b 100644 --- a/trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core/src/org/eclipse/tracecompass/incubator/internal/trace/server/jersey/rest/core/model/ConfigurationSourceType.java +++ b/trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core/src/org/eclipse/tracecompass/incubator/internal/trace/server/jersey/rest/core/model/ConfigurationSourceType.java @@ -46,6 +46,25 @@ public interface ConfigurationSourceType { * configuration instance of this type. Use 'path' key for file * URIs. */ - @Schema(description = "A list of configuration parameter descriptors to be passed when creating or updating a configuration instance of this type.") + @Schema(description = "A list of configuration parameter descriptors to be " + + "passed when creating or updating a configuration instance of this " + + "type. Use this instead of schema. Omit if not used.") List getParameterDescriptors(); + + /** + * @return a JSON schema that describes the parameters that the front-end + * needs to provide with corresponding values. Use this for complex + * parameter descriptions instead of parameterDescriptors. + */ + @Schema(description = "A JSON object that describes a schema for parameters that " + + "the front-end needs to provide with corresponding values. " + + "Use this for complex parameter descriptions instead of parameterDescriptors. " + + "Omit if not used.") + OptionalSchema getSchema(); + + /** + * A JSON Object defining a schema. + */ + interface OptionalSchema { + } }