Skip to content

Commit

Permalink
swagger: Fix response descriptions for successful DP creation
Browse files Browse the repository at this point in the history
Update also method name of the  provider creation operation.

Signed-off-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
  • Loading branch information
bhufmann committed Nov 4, 2024
1 parent d45f21c commit 697c889
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import static org.eclipse.tracecompass.incubator.internal.trace.server.jersey.rest.core.services.EndpointConstants.ANN;
import static org.eclipse.tracecompass.incubator.internal.trace.server.jersey.rest.core.services.EndpointConstants.CFG_CREATE_DESC;
import static org.eclipse.tracecompass.incubator.internal.trace.server.jersey.rest.core.services.EndpointConstants.CFG_KEYS_DESC;
import static org.eclipse.tracecompass.incubator.internal.trace.server.jersey.rest.core.services.EndpointConstants.CFG_OUTPUT_ID;
import static org.eclipse.tracecompass.incubator.internal.trace.server.jersey.rest.core.services.EndpointConstants.CFG_TYPE_ID;
import static org.eclipse.tracecompass.incubator.internal.trace.server.jersey.rest.core.services.EndpointConstants.COLUMNS;
import static org.eclipse.tracecompass.incubator.internal.trace.server.jersey.rest.core.services.EndpointConstants.COLUMNS_EX;
Expand Down Expand Up @@ -1249,9 +1250,9 @@ public Response getConfigurationType(
* @param expUUID
* desired experiment UUID
* @param outputId
* Output ID for the data provider to query
* ID of the output provider to create a derived output from
* @param queryParameters
* the query parameters used to create a data provider
* the query parameters used to create a output provider
* @return a list of data provider descriptors
*/
@SuppressWarnings("null")
Expand All @@ -1261,13 +1262,13 @@ public Response getConfigurationType(
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Get a derived data provider from a input configuration", responses = {
@ApiResponse(responseCode = "200", description = "Returns a list of output provider descriptors", content = @Content(array = @ArraySchema(schema = @Schema(implementation = DataProvider.class)))),
@ApiResponse(responseCode = "200", description = "Returns the derived data provider descriptor.", content = @Content(schema = @Schema(implementation = DataProvider.class))),
@ApiResponse(responseCode = "400", description = INVALID_PARAMETERS, content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "404", description = PROVIDER_CONFIG_NOT_FOUND, content = @Content(schema = @Schema(implementation = String.class))),
})
public Response createDataProvider(
public Response createProvider(
@Parameter(description = EXP_UUID) @PathParam("expUUID") UUID expUUID,
@Parameter(description = OUTPUT_ID) @PathParam("outputId") String outputId,
@Parameter(description = CFG_OUTPUT_ID) @PathParam("outputId") String outputId,
@RequestBody(description = CFG_CREATE_DESC + " " + CFG_KEYS_DESC, content = {
@Content(examples = @ExampleObject(DP_CFG_EX), schema = @Schema(implementation = org.eclipse.tracecompass.incubator.internal.trace.server.jersey.rest.core.model.OutputConfigurationQueryParameters.class))
}, required = true) OutputConfigurationQueryParameters queryParameters) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ public final class EndpointConstants {
* Swagger @Parameter description constants, named after their parameter
* name; alphabetical order.
*/
static final String CFG_TYPE_ID = "The configuration source type ID"; //$NON-NLS-1$
static final String CFG_CONFIG_ID = "The configuration instance ID"; //$NON-NLS-1$
static final String CFG_OUTPUT_ID = "ID of the output provider to create a derived output from"; //$NON-NLS-1$
static final String CFG_TYPE_ID = "The configuration source type ID"; //$NON-NLS-1$
static final String DERIVED_OUTPUT_ID = "ID of the derived output provider"; //$NON-NLS-1$
static final String EXP_UUID = "UUID of the experiment to query"; //$NON-NLS-1$
static final String MARKER_SET_ID = "The optional requested marker set's id"; //$NON-NLS-1$
Expand Down

0 comments on commit 697c889

Please sign in to comment.