Ignore:
Timestamp:
Mar 9, 2021, 4:50:02 PM (15 months ago)
Author:
djay
Message:

Move the execute endpoint to /processes/{processID}. Fixes in oas.cfg: use opengeospatial/ogcapi-processes github repo for schemas URLs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/service_json.c

    r985 r986  
    533533      json_object *res3=json_object_new_object();
    534534      map* pmTmp=getMapFromMaps(m,"lenv","requestType");
    535       if(pmTmp!=NULL && strncasecmp(pmTmp->value,"desc",4)==0)
     535      if(pmTmp!=NULL && strncasecmp(pmTmp->value,"desc",4)==0){
    536536        json_object_object_add(res2,"rel",json_object_new_string("process-desc"));
     537      }
    537538      else{
    538539        json_object_object_add(res2,"rel",json_object_new_string("execute"));
    539         json_object_object_add(res3,"rel",json_object_new_string("alternate"));
    540         json_object_object_add(res3,"type",json_object_new_string("text/html"));
    541       }
     540      }
     541      json_object_object_add(res3,"rel",json_object_new_string("alternate"));
     542      json_object_object_add(res3,"type",json_object_new_string("text/html"));
    542543      json_object_object_add(res2,"type",json_object_new_string("application/json"));
    543       json_object_object_add(res2,"title",json_object_new_string("Process Description"));
    544544      map* tmpUrl=getMapFromMaps(m,"openapi","rootUrl");
    545545      char* tmpStr=(char*) malloc((strlen(tmpUrl->value)+strlen(rUrl)+13)*sizeof(char));
    546       sprintf(tmpStr,"%s/processes/%s/",tmpUrl->value,rUrl);
    547       if(doc==NULL){
     546      sprintf(tmpStr,"%s/processes/%s",tmpUrl->value,rUrl);
     547      if(pmTmp!=NULL && strncasecmp(pmTmp->value,"desc",4)!=0){
    548548        json_object_object_add(res2,"title",json_object_new_string("Execute End Point"));
    549549        json_object_object_add(res3,"title",json_object_new_string("Execute End Point"));
    550         char* tmpStr1=zStrdup(tmpStr);
     550        /*char* tmpStr1=zStrdup(tmpStr);
    551551        tmpStr=(char*) realloc(tmpStr,(strlen(tmpStr)+6)*sizeof(char));
    552552        sprintf(tmpStr,"%sjobs",tmpStr1);
    553         free(tmpStr1);
    554         char* tmpStr3=(char*) malloc((strlen(tmpStr)+6)*sizeof(char));
    555         sprintf(tmpStr3,"%s.html",tmpStr);
    556         json_object_object_add(res3,"href",json_object_new_string(tmpStr3));
    557         free(tmpStr3);
    558       }
     553        free(tmpStr1);*/
     554      }else{
     555        json_object_object_add(res2,"title",json_object_new_string("Process Description"));
     556        json_object_object_add(res3,"title",json_object_new_string("Process Description"));
     557      }
     558      char* tmpStr3=(char*) malloc((strlen(tmpStr)+6)*sizeof(char));
     559      sprintf(tmpStr3,"%s.html",tmpStr);
     560      json_object_object_add(res3,"href",json_object_new_string(tmpStr3));
     561      free(tmpStr3);
    559562      json_object_object_add(res2,"href",json_object_new_string(tmpStr));
    560563      free(tmpStr);
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png