Ignore:
Timestamp:
Oct 23, 2020, 6:28:11 PM (4 years ago)
Author:
djay
Message:

Display inputs when not valid properly. Add element for list of values. Add required operationId and summary for every request, useful to validate the APIusing openapi-cli.

File:
1 edited

Legend:

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

    r963 r965  
    13751375    }
    13761376    if (tok->char_offset < slen){
     1377      fprintf(stderr, "Error parsing json\n");
    13771378      return NULL;
    13781379    }
     
    18141815              json_object_array_add(cc,json_object_new_string(vMap->value));
    18151816              json_object_object_add(methodc,"tags",cc);
     1817              json_object_object_add(methodc,"operationId",json_object_new_string(vMap->value));
     1818
    18161819            }
    18171820            json_object *responses=json_object_new_object();
     
    19241927                 
    19251928                  json_object *pajDescription=json_object_new_object();
    1926                   if(pmTitle!=NULL)
     1929                  json_object *pajPost=json_object_new_object();
     1930                  if(pmTitle!=NULL){
    19271931                    json_object_object_add(pajDescription,"description",json_object_new_string(pmTitle->value));
     1932                    json_object_object_add(pajPost,"summary",json_object_new_string(pmTitle->value));
     1933                  }
    19281934                  json_object *pajResponse=json_object_new_object();
    19291935                  json_object_object_add(pajResponse,"200",pajDescription);
    19301936
    1931                   json_object *pajPost=json_object_new_object();
    19321937                  json_object_object_add(pajPost,"requestBody",pajRBody);
    19331938                  json_object_object_add(pajPost,"responses",pajResponse);
     1939                  json_object_object_add(pajPost,"operationId",json_object_new_string(pmState->value));
    19341940
    19351941                  json_object *pajMethod=json_object_new_object();
     
    19421948                  json_object *pajFinal=json_object_new_object();
    19431949                  json_object_object_add(pajFinal,pacUri,pajMethod);
    1944 
    19451950                  json_object_object_add(pajRes,pmState->value,pajFinal);
    19461951
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