Skip to content

Commit

Permalink
server: Update swagger schema for BookmarkQueryParameters
Browse files Browse the repository at this point in the history
Since the BookmarkServiceManager class is mentioning the BookmarkQueryParameters
for its endpoints, the actual swagger documentation was not aligned with it. Now,
the swagger documentation (schema) is same as its implementation and usage.

[Fixed] Incorrect swagger documentation for BookmarkQueryParameters is fixed

Signed-off-by: Kaveh Shahedi <kaveh.shahedi@ericsson.com>
  • Loading branch information
kavehshahedi committed Nov 12, 2024
1 parent 06c61d7 commit 6159498
Showing 1 changed file with 29 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
*******************************************************************************/
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;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;

Expand All @@ -20,21 +22,35 @@
* @since 10.1
*/
public interface BookmarkQueryParameters {
/**
* @return The bookmark name
*/
@Schema(description = "The name to give this bookmark", requiredMode = RequiredMode.REQUIRED)
String getName();

/**
* @return The start time
* @return The bookmark parameters
*/
@Schema(description = "The bookmark's start time", requiredMode = RequiredMode.REQUIRED)
long getStart();
@JsonProperty("parameters")
@Schema(description = "The bookmark parameters", requiredMode = RequiredMode.REQUIRED)
BookmarkParameters getParameters();

/**
* @return The end time
*/
@Schema(description = "The bookmark's end time", requiredMode = RequiredMode.REQUIRED)
long getEnd();

interface BookmarkParameters {
/**
* @return The bookmark name
*/
@JsonProperty("name")
@Schema(description = "The name to give this bookmark", requiredMode = RequiredMode.REQUIRED)
String getName();

/**
* @return The start time
*/
@JsonProperty("start")
@Schema(description = "The bookmark's start time", requiredMode = RequiredMode.REQUIRED)
long getStart();

/**
* @return The end time
*/
@JsonProperty("end")
@Schema(description = "The bookmark's end time", requiredMode = RequiredMode.REQUIRED)
long getEnd();
}
}

0 comments on commit 6159498

Please sign in to comment.