mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fixing the empty methods for resources in the synapse configuration issue when auto publishing the apis for the REST service.
This commit is contained in:
parent
00e57bd800
commit
a6203845c9
@ -184,15 +184,7 @@ public class APIPublisherServiceImpl implements APIPublisherService {
|
||||
private void processHttpVerbs(API api) {
|
||||
for (URITemplate uriTemplate : api.getUriTemplates()) {
|
||||
String httpVerbString = uriTemplate.getHTTPVerb();
|
||||
String[] httpVerbs = uriTemplate.getMethodsAsString().split(" ");
|
||||
boolean httpVerbStringExistsMethods = false;
|
||||
for (String aHttpVerb: httpVerbs){
|
||||
if (aHttpVerb.trim().equalsIgnoreCase(httpVerbString)){
|
||||
httpVerbStringExistsMethods = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!httpVerbStringExistsMethods){
|
||||
if (httpVerbString != null && !httpVerbString.isEmpty()) {
|
||||
uriTemplate.setHttpVerbs(httpVerbString);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user