Find correct endpoint for each request in OpenApi Documentation
Hi there,
we have a very detailed OpenApi Documentation which we want to take as the basis of our Rest Api tests. ReadyApi so far does a grate job in automatically generating test cases and capturing a lot of possible error. What really bothers me though is that it takes the same endpoint for all requests. While programs such as schemathesis, tcases, insomnia or postman all take the correct endpoint address for each request Ready Api seems to just take the first one it finds in the OpenApi.
Is their any setting that changes this?
Here is some code to add some details:
servers:
- url: 'http://{IP}/api/v-1_0'
description: http direct
variables:
IP:
default: '169.254.2.0'
description: IP of the device
- url: 'https://{IP}/api/v-1_0'
description: https direct
variables:
IP:
default: '169.254.2.0'
description: IP of the device
paths:
# expect endpoint 'http://169.254.2.0
/ping:
get:
servers:
- url: 'http://{IP}'
description: http direct
variables:
IP:
default: '169.254.2.0'
description: IP of the device
summary: dummy text
description: dummy text
operationId: Ping
responses:
'200':
.
.
.
#---------------------------------------------------------------------------
# /system expected endpoint: 'http:\\169.254.2.0\api\v-1_0
#---------------------------------------------------------------------------
/sys/model:
get:
summary: dummy text
description: dummy text.
operationId: GET_sys/model
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#reference to model schema'
tags:
- /system
so what I'd expect is that the ping request would by default be used with the endpoint 'http:\\169.254.2.0' while the \sys\model request would be used with the endpoint 'http:169.254.2.0\api\v-1_0\' instead the endpoint setting in every generated functional test default to 'http:\\169.254.2.0' I can easily change it to the correct one by choosing the right one from the endpoint drop down but that is a paine to do that for all requests and it seems so obsolete as so many other tools do it as I'd expect it.
Any suggestions are highly appreciated.
Thanks!
Lenn