Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove pdf-exporter from REST API schema examples #236

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading