S
Stefan Drissen
Guest
Hi Srinivas, Does the rest expose editor give any user interface clue that you can do this? I only see that there is an input temp-table. I can see this working for the query string parameters, but how do I indicate which temp-table field needs to be mapped in the path parameters? A quick test with the following .p @openapi.openedge.export FILE(type="REST", executionMode="single-run", useReturnValue="false", writeDataSetBeforeImage="false"). DEFINE TEMP-TABLE tt NO-UNDO FIELD adm_nr AS INTEGER FIELD debtor AS INTEGER FIELD country AS CHARACTER INDEX ttix IS UNIQUE PRIMARY adm_nr debtor. @openapi.openedge.export(type="REST", useReturnValue="false", writeDataSetBeforeImage="false"). PROCEDURE lala: DEFINE INPUT PARAMETER TABLE FOR tt. FIND FIRST tt NO-ERROR. IF AVAILABLE tt THEN MESSAGE tt.adm_nr tt.debtor. ELSE MESSAGE "tt not available". END PROCEDURE. With path mapping defined as: tt/{adm_nr}/{debtor} With both path parameters mapped to interface parameter 'tt' results in errors in the AppServer log: Error parsing JSON: unexpected token: eof. (15360) Error attempting to run 'lala tt.p'. JSON value of ProDataset or temp-table parameter is invalid or empty. (16992) An incomplete client request. (8020)
Continue reading...
Continue reading...