-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Requests checking request method type of previous request #100
Comments
This may be caused by splitting a path into two in the spec, as mentioned in daveshanley/vacuum#473 That might also explain why it happens intermittently, but working correctly on the second request is strange. |
I tried running this workflow, and recorded it. I was unable to re-produce these issues. The (/api/libraries/{id}/item) fails because it's a genuine 404, there is no endpoint in the spec that matches. This is running the spec provided above, in mock mode (-x), Running postman against this workflow returns all the expected values and I cannot re-create the errors. wiretap-workflow.mp4 |
(originally posted in Discord under the associated thread https://discord.com/channels/923258363540815912/1126857048273981551/1208217864054636626)
Originally reported with wiretap 0.1.1
Requests to an endpoint fails if the previous request was to an endpoint that does not have the same request type (
GET
,POST
, etc). This behavior has been encountered using both Python and curl.The error I'm getting is:
Current spec: https://github.com/nichwall/audiobookshelf/blob/collection_routes_openapi_v1/build-docs/swagger-output.json
Testing with the
/login
endpoint just using curl toPOST
works on a fresh run. However, after running the Python script the same curlPOST
to/login
fails with a line number of 296 instead of 354 (so the violations references/api/items/{id}
in the spec instead of/login
).More details
The Python script makes the following requests (all valid calls from before making the OpenAPI spec):
POST
to/login
(succeeds)GET
to/api/libraries
(fails with missingGET
to line 354, or/login
in spec)GET
to/api/libraries/{id}/items
(succeeds)GET
to/api/items/{id}
(fails with invalid schema, unrelated to this error)Sending the curl
POST
to/login
then fails with a missingGET
definition, referencing/api/items/{id}
in spec.After adding a dummy
get
request to the/login
endpoint, theget
request to/api/libraries
immediately afterwards passes validation (but thePOST
to/login
after the script will still fail).Steps to reproduce
Spec without all request types defined on the previous endpoint hit through wiretap.
The text was updated successfully, but these errors were encountered: