Does Portman provide the ability to overwrite a request body object with values contained in a static json file #500
-
Hi there, I have a use case wherein I need to generate a json object for what I term an Applicant. Portman is working beautifully in that it generates a single Applicant object from my API Spec. However, I have a valid use case to have 2x Applicants on an application. I have tried a number of things including trying to overwrite the entire Applicants object with data contained in a static json file. It should be noted that the above didn't work. No errors were thrown but the original Applicants object remained. What would be considered the best practice in Portman to achieve such an end? Kind regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I managed to figure this out. Basically, I do the following: This overwrites my Applicants object with the values stored in my local json resource file. Any variables stored with the static json file, designated by {{var_name}} can then simply be overwritten by using operationPreRequestScripts. |
Beta Was this translation helpful? Give feedback.
I managed to figure this out. Basically, I do the following:
This overwrites my Applicants object with the values stored in my local json resource file. Any variables stored with the static json file, designated by {{var_name}} can then simply be overwritten by using operationPreRequestScripts.