Adding data types to invoke methods

Posted by michaelstabourlos on 17-Jun-2019 14:12

Hi everyone,

Does someone know how I can add data types of the input/output parameters of an invoke to the catalog .json file? 

@openapi.openedge.export(type="REST", useReturnValue="false", writeDataSetBeforeImage="false").
@progress.service.resourceMapping(type="REST", operation="invoke", URI="/CanAddDataTypes", alias="", mediaType="application/json").
method public void CanAddDataTypes(input pUserID as int64,
                                   input pUserType as character,
                                   output pCanAdd as logical):

  run stuff.p(input pUserID,
              input pUserType,
              output pCanAdd).

end method.


This is being generated in the catalog:

{
  "name": "CanAddDataTypes",
  "path": "\/CanAddDataTypes",
  "useBeforeImage": false,
  "type": "invoke",
  "verb": "put",
  "params": [
     {
       "name": "pUserID",
       "type": "REQUEST_BODY"
     },
     {
       "name": "pUserType",
       "type": "REQUEST_BODY"
     },
     {
       "name": "pCanAdd",
       "type": "RESPONSE_BODY"
     }
   ]
}

It would be very useful if the "type": would contain more info, or if an extra parameter "dataType" could be added.

Thank you in advance!

All Replies

This thread is closed