Skip to content

Commit

Permalink
swagger: Add DataProviderCapabilities to swagger documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
  • Loading branch information
bhufmann committed Jan 20, 2025
1 parent 855feeb commit 6ca4880
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,11 @@ enum ProviderType {
*/
@Schema(required = false, description = "Optional input configuration used to create this derived data provider.")
Configuration getConfiguration();

/**
* @return the input configuration used to create this data provider.
*/
@Schema(required = false, description = "Optional data provider capabilities, such as \"canCreate\" and \"canDelete\".")
DataProviderCapabilities getCapabilities();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*******************************************************************************
* Copyright (c) 2025 Ericsson
*
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0 which
* accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package org.eclipse.tracecompass.incubator.internal.trace.server.jersey.rest.core.model;

import com.fasterxml.jackson.annotation.JsonProperty;

import io.swagger.v3.oas.annotations.media.Schema;

/**
* Contributes to the model used for TSP swagger-core annotations.
*/
public interface DataProviderCapabilities {

/**
* @return The name.
*/
@JsonProperty("canCreate")
@Schema(description = "Whether the data provider can create derived data providers.")
boolean canCreate();

/**
* @return The ID.
*/
@Schema(description = "Whether the data provider can be deleted.")
@JsonProperty("canDelete")
String canDelete();
}

0 comments on commit 6ca4880

Please sign in to comment.