Normally I only use separate parameters for the path parameters but only one for the body
Original Message:
Sent: Tue June 10, 2025 10:53 AM
From: Nadir K Amra
Subject: IWS: Possible to ignore unknown parameters?
I do agree there are many options to doing REST services, of which IWS is legitimate option.
I do not agree with having one parameter in ALL cases. You basically defeat the purpose of having IWS pass REST payloads as RPG/COBOL fields.
But, if you choose to have one character input parameter, and a client sends a REST request, you will get the JSON request in the parameter. Then it will be up to the ILE program to parse the JSON document. You will also have to update the SWAGGER document that gets generated too.
------------------------------
Nadir K Amra
Original Message:
Sent: Tue June 10, 2025 10:45 AM
From: Juan Manuel Alcudia Peñas
Subject: IWS: Possible to ignore unknown parameters?
Hello,
I don't use IWS much as I think there are better solutions but if I do, I never use parameters in IWS the way you do as the limitations are high, specially in old versions.
The best thing you can do is just to use a single parameter: a json and work with it. That way you can avoid passing parameters and you can be more flexible: i.e. deploying a new version of the rpg / cobol without changing the service.
Regards,
------------------------------
Juan Manuel Alcudia
CD-Invest
IBM Champion
President of Common Europe
Original Message:
Sent: Tue June 10, 2025 10:40 AM
From: Nadir K Amra
Subject: IWS: Possible to ignore unknown parameters?
At this time, you cannot ignore parameters in a deployed service. It is on our TODO list.
------------------------------
Nadir K Amra
Original Message:
Sent: Mon June 09, 2025 05:05 PM
From: Sam Byrd
Subject: IWS: Possible to ignore unknown parameters?
I need to implement a service that's been defined by someone else that has 100+ field. For my use case, I only care about a dozen of the fields. Is it possible for me to define my pcml (or other parameters) in such a way to just ignore the undefined fields?
------------------------------
Sam Byrd
------------------------------