In Apidog, you can first send a request and then directly save this request as an API specification.1
In Apidog, click "New Request".
2
Paste the following URL into the address bar:
https://mock.apidog.com/m1/710637-685828-default/category/1
3
Send the request and receive the response.
4
Click "Save as endpoint" to save this request as an endpoint.
5
Switch to the "Preview" tab to see the endpoint spec.
If your interface does not match the image above, please switch to Request-first Mode
. The actual sent request and the response become the endpoint's example, and the schema will be automatically parsed and generated. This is the most convenient method for generating an API spec.Note that the endpoint spec generated in this way can recognize Query Params in a REST API, but it cannot recognize Path Params. For example, in the above case, the correct request URL spec should be /category/{id}
, where {id}
was not recognized because it was an integer 1
in the actual request. You will need to manually change it to {id}
in the path of the endpoint spec.
Next Step
Add an assertion