Skip to content

Commit 9f10f6b

Browse files
committed
Rename interface method
1 parent 14ba957 commit 9f10f6b

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed

components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConsumerImpl.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -3624,14 +3624,14 @@ private Map<String, String> getHostWithSchemeMappingForEnvironment(API api, Stri
36243624
if (StringUtils.containsIgnoreCase(api.getTransports(), APIConstants.HTTP_PROTOCOL)
36253625
&& vhost.getHttpPort() != -1) {
36263626
String httpUrl = gatewayDeployer != null ?
3627-
gatewayDeployer.getResolvedAPIInvocationUrl(api.getUuid(), vhost.getHttpUrl(), environment) :
3627+
gatewayDeployer.getAPIExecutionURL(api.getUuid(), vhost.getHttpUrl(), environment) :
36283628
vhost.getHttpUrl();
36293629
hostsWithSchemes.put(APIConstants.HTTP_PROTOCOL, httpUrl);
36303630
}
36313631
if (StringUtils.containsIgnoreCase(api.getTransports(), APIConstants.HTTPS_PROTOCOL)
36323632
&& vhost.getHttpsPort() != -1) {
36333633
String httpsUrl = gatewayDeployer != null ?
3634-
gatewayDeployer.getResolvedAPIInvocationUrl(api.getUuid(), vhost.getHttpsUrl(), environment) :
3634+
gatewayDeployer.getAPIExecutionURL(api.getUuid(), vhost.getHttpsUrl(), environment) :
36353635
vhost.getHttpsUrl();
36363636
hostsWithSchemes.put(APIConstants.HTTPS_PROTOCOL, httpsUrl);
36373637
}

components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/deployer/ExternalGatewayDeployer.java

+3-6
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,9 @@ public boolean undeploy(String apiID, String apiName, String apiVersion, String
9090
public List<String> validateApi(API api) throws DeployerException;
9191

9292
/**
93-
* This method returns the resolved API invocation URL by replacing all placeholders appropriately
93+
* This method returns the resolved API execution URL by replacing all placeholders appropriately
9494
*
95-
* @return String resolved url
95+
* @return String api execution url
9696
*/
97-
public default String getResolvedAPIInvocationUrl(String apiId, String url, Environment environment)
98-
throws DeployerException {
99-
return url;
100-
}
97+
public String getAPIExecutionURL(String apiId, String url, Environment environment) throws DeployerException;
10198
}

components/apimgt/org.wso2.carbon.apimgt.rest.api.admin.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/admin/v1/dto/VHostDTO.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public VHostDTO host(String host) {
4040
@ApiModelProperty(example = "mg.wso2.com", required = true, value = "")
4141
@JsonProperty("host")
4242
@NotNull
43-
@Size(min=1,max=255) public String getHost() {
43+
@Pattern(regexp="^(([a-zA-Z0-9\\{\\}]|[a-zA-Z0-9\\{\\}][a-zA-Z0-9\\-\\{\\}]*[a-zA-Z0-9\\{\\}])\\.)*([A-Za-z0-9\\{\\}]|[A-Za-z0-9\\{\\}][A-Za-z0-9\\-\\{\\}]*[A-Za-z0-9\\{\\}])$") @Size(min=1,max=255) public String getHost() {
4444
return host;
4545
}
4646
public void setHost(String host) {

components/apimgt/org.wso2.carbon.apimgt.rest.api.admin.v1/src/main/resources/admin-api.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -4832,7 +4832,8 @@ components:
48324832
maxLength: 255
48334833
minLength: 1
48344834
# hostname regex as per RFC 1123 (http://tools.ietf.org/html/rfc1123) and appended *
4835-
#pattern: '^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$'
4835+
# included {} to allow hostname templates
4836+
pattern: '^(([a-zA-Z0-9\{\}]|[a-zA-Z0-9\{\}][a-zA-Z0-9\-\{\}]*[a-zA-Z0-9\{\}])\.)*([A-Za-z0-9\{\}]|[A-Za-z0-9\{\}][A-Za-z0-9\-\{\}]*[A-Za-z0-9\{\}])$'
48364837
type: string
48374838
example: mg.wso2.com
48384839
httpContext:

components/apimgt/org.wso2.carbon.apimgt.rest.api.common/src/main/resources/admin-api.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -4832,7 +4832,8 @@ components:
48324832
maxLength: 255
48334833
minLength: 1
48344834
# hostname regex as per RFC 1123 (http://tools.ietf.org/html/rfc1123) and appended *
4835-
#pattern: '^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$'
4835+
# included {} to allow hostname templates
4836+
pattern: '^(([a-zA-Z0-9\{\}]|[a-zA-Z0-9\{\}][a-zA-Z0-9\-\{\}]*[a-zA-Z0-9\{\}])\.)*([A-Za-z0-9\{\}]|[A-Za-z0-9\{\}][A-Za-z0-9\-\{\}]*[A-Za-z0-9\{\}])$'
48364837
type: string
48374838
example: mg.wso2.com
48384839
httpContext:

0 commit comments

Comments
 (0)