Skip to content

Commit

Permalink
chore: remove pdf-exporter from REST API schema examples (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
grigoriev authored Dec 20, 2024
1 parent 460f9c8 commit 21c37d0
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@Getter
@Schema(description = "Represents the context for building URLs related to Polarion services")
public class Context {

@Schema(description = "The extension context used as a base for URL construction", example = "pdf-exporter")
@Schema(description = "The extension context used as a base for URL construction")
private final @NotNull String extensionContext;

@Schema(description = "Returns the base URL constructed with the extension context", example = "/polarion/pdf-exporter")
@Schema(description = "Returns the base URL constructed with the extension context")
public @NotNull String getBaseUrl() {
return "/polarion/" + extensionContext;
}

@Schema(description = "Returns the REST API URL constructed with the extension context", example = "/polarion/pdf-exporter/rest")
@Schema(description = "Returns the REST API URL constructed with the extension context")
public @NotNull String getRestUrl() {
return "/polarion/" + extensionContext + "/rest";
}
Expand All @@ -26,7 +27,7 @@ public class Context {
return getRestUrl() + "/swagger";
}

public Context(String extensionContext) {
public Context(@Nullable String extensionContext) {
if (extensionContext == null || extensionContext.isBlank()) {
throw new IllegalArgumentException("Extension context must be provided");
}
Expand Down

0 comments on commit 21c37d0

Please sign in to comment.