Importe OpenAPI spec don't set default value

I have imported an OpenAPI with JSON that define “page” query parameter with default value “1”

Endpoint is well imported, but when I click on “Run” tab, by default the value is empty, is possible to automatically set value to the exemple one ?


Thanks for the feedback. According to OAS 3.0, the default value is the one that the server uses if the client does not supply the parameter value in the request. Therefore, the meaning of the default value is not the value filled in by default when sending the request.

1 Like

https://swagger.io/docs/specification/v3_0/describing-parameters/#default-parameter-values

Thanks for your response :slightly_smiling_face:

The issue is that ApiDog import it as an active parameter without a value

In my case (using API Platform with Symfony), this leads to a validation error because ApiDog sends: “http://my-service.co?page=
http://my-service.co” => OK default to page 1

In my reported case, the “default” value was set to “1,” but no example was declared. However, even when I add an example value of “1,” the same behavior occurs the value remains empty when I import spec.

Based on your explanation and specs, if I understand correctly, we should use example instead of the default value in OpenAPI