Commit 21c37d0 1 parent 460f9c8 commit 21c37d0 Copy full SHA for 21c37d0
File tree 1 file changed +5
-4
lines changed
app/src/main/java/ch/sbb/polarion/extension/generic/rest/model
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 3
3
import io .swagger .v3 .oas .annotations .media .Schema ;
4
4
import lombok .Getter ;
5
5
import org .jetbrains .annotations .NotNull ;
6
+ import org .jetbrains .annotations .Nullable ;
6
7
7
8
@ Getter
8
9
@ Schema (description = "Represents the context for building URLs related to Polarion services" )
9
10
public class Context {
10
11
11
- @ Schema (description = "The extension context used as a base for URL construction" , example = "pdf-exporter" )
12
+ @ Schema (description = "The extension context used as a base for URL construction" )
12
13
private final @ NotNull String extensionContext ;
13
14
14
- @ Schema (description = "Returns the base URL constructed with the extension context" , example = "/polarion/pdf-exporter" )
15
+ @ Schema (description = "Returns the base URL constructed with the extension context" )
15
16
public @ NotNull String getBaseUrl () {
16
17
return "/polarion/" + extensionContext ;
17
18
}
18
19
19
- @ Schema (description = "Returns the REST API URL constructed with the extension context" , example = "/polarion/pdf-exporter/rest" )
20
+ @ Schema (description = "Returns the REST API URL constructed with the extension context" )
20
21
public @ NotNull String getRestUrl () {
21
22
return "/polarion/" + extensionContext + "/rest" ;
22
23
}
@@ -26,7 +27,7 @@ public class Context {
26
27
return getRestUrl () + "/swagger" ;
27
28
}
28
29
29
- public Context (String extensionContext ) {
30
+ public Context (@ Nullable String extensionContext ) {
30
31
if (extensionContext == null || extensionContext .isBlank ()) {
31
32
throw new IllegalArgumentException ("Extension context must be provided" );
32
33
}
You can’t perform that action at this time.
0 commit comments