Skip to content

Commit

Permalink
server: Add swagger doc for optional XY default entry flag
Browse files Browse the repository at this point in the history
Bug 581326

[Added] Swagger doc for optional XY default entry flag

Change-Id: Ie47a51cc1f05e4762eeaff34cd14397b7e9f14da
Signed-off-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass.incubator/org.eclipse.tracecompass.incubator/+/199321
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Tested-by: Marco Miller <marco.miller@ericsson.com>
Reviewed-by: Marco Miller <marco.miller@ericsson.com>
  • Loading branch information
bhufmann committed Jan 13, 2023
1 parent 3a7d2de commit 125019c
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**********************************************************************
* Copyright (c) 2023 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.
*/
@Schema(allOf = TreeDataModel.class)
public interface XYTreeEntry {

/**
* @return whether or not the entry is a default entry and its xy data
* should be fetched by default.
*/
@JsonProperty("isDefault")
@Schema(description = "Optional flag to indicate whether or not the entry is a default entry and its xy data should be fetched by default.")
boolean isDefault();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**********************************************************************
* Copyright (c) 2023 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 java.util.List;

import org.eclipse.jdt.annotation.NonNull;

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

/**
* Contributes to the model used for TSP swagger-core annotations.
*/
@Schema(allOf = TreeEntryModel.class)
public interface XYTreeEntryModel {

/**
* @return The entries.
*/
@NonNull
List<@NonNull XYTreeEntry> getEntries();
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ public interface XYTreeResponse {
* @return The model.
*/
@Nullable
TreeEntryModel getModel();
XYTreeEntryModel getModel();
}

0 comments on commit 125019c

Please sign in to comment.