I have not but will explore that also. Thank you for providing this info.
Right now I am exploring this message-template which provides the mock data.
and I am trying to see when this mock data is returned. My current use case is using Switch and setting up the condition
($httpVerb() = 'GET' and $header("X-IBM-Client-Id") = 12345678)
but instead of using the X-IBM-Client-Id, I need to the use name(X-IBM-Client-name) so not sure if name can be available during execution ?
Any suggestions.
------------------------------
Syed Imtiyaz Alam
------------------------------
Original Message:
Sent: Fri January 26, 2024 03:38 AM
From: Matthias Jungbauer
Subject: testing APIC apis and sending dummy test data based on the schema
Did you explore this article https://www.ibm.com/products/api-connect/api-testing ?
XSLT supports if and choose https://www.w3schools.com/xml/xsl_if.asp
But I doubt your team appreciates the effort you spend in writing a XSLT file for testing APIC.
------------------------------
Matthias Jungbauer
Original Message:
Sent: Wed January 24, 2024 08:09 AM
From: Syed Imtiyaz Alam
Subject: testing APIC apis and sending dummy test data based on the schema
Hello Team,
I'm in the process of conducting a POC to explore how APIC can provide/return default data. I'm exploring a couple of methods:
- Utilizing message templates, although it appears that this feature is not available in version 10.x.
- Implementing XSLT policy.
I am currently using XSLT and attempting to comprehend how to incorporate an IF condition, such as:
($httpVerb() = 'GET') and headers.X-ibm-client-name
This condition should trigger the execution of the XSLT. I'm uncertain about how to retrieve the IBM client name.
Additionally, I'm investigating if there's a way to retrieve a sample response already available on the developer portal.
Any suggestions would be greatly appreciated.
Thank you,
Imtiyaz
------------------------------
Syed Imtiyaz Alam
------------------------------