Forum Discussion

JoostDG's avatar
JoostDG
Frequent Contributor
3 years ago
Solved

How to make swagger compliance assertion url dynamic

Hi, I have been struggling to get some grip on the swagger compliance assertion. I want to provide a dynamic url but ReadyAPI doesn't seem to cope with it in the way I would expect. Use case: The s...
  • nmrao's avatar
    nmrao
    3 years ago

    JoostDG 

    Here is an approach which you can try.

    NOTE:

    1. In the Swagger Compliance Assertion set a file path or url (absolute value). The value will be replaced with value passed at run time as project property, SWAGGER_URL

    2. Here, property expansion is not used. Instead value is overridden run time.

    3. Please follow the comments provided in the script.

    4. This is project setup script only.

     

    Project Setup Script 

    Here is the log message when the script is run