|
|
@ -184,15 +184,7 @@ public class APIPublisherServiceImpl implements APIPublisherService {
|
|
|
|
private void processHttpVerbs(API api) {
|
|
|
|
private void processHttpVerbs(API api) {
|
|
|
|
for (URITemplate uriTemplate : api.getUriTemplates()) {
|
|
|
|
for (URITemplate uriTemplate : api.getUriTemplates()) {
|
|
|
|
String httpVerbString = uriTemplate.getHTTPVerb();
|
|
|
|
String httpVerbString = uriTemplate.getHTTPVerb();
|
|
|
|
String[] httpVerbs = uriTemplate.getMethodsAsString().split(" ");
|
|
|
|
if (httpVerbString != null && !httpVerbString.isEmpty()) {
|
|
|
|
boolean httpVerbStringExistsMethods = false;
|
|
|
|
|
|
|
|
for (String aHttpVerb: httpVerbs){
|
|
|
|
|
|
|
|
if (aHttpVerb.trim().equalsIgnoreCase(httpVerbString)){
|
|
|
|
|
|
|
|
httpVerbStringExistsMethods = true;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!httpVerbStringExistsMethods){
|
|
|
|
|
|
|
|
uriTemplate.setHttpVerbs(httpVerbString);
|
|
|
|
uriTemplate.setHttpVerbs(httpVerbString);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|