Skip to content
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

Ability to select multiple specific endpoints #703

Open
Stranger6667 opened this issue Sep 4, 2020 · 0 comments · May be fixed by #1256
Open

Ability to select multiple specific endpoints #703

Stranger6667 opened this issue Sep 4, 2020 · 0 comments · May be fixed by #1256
Labels
Difficulty: Intermediate Requires some experience Priority: Medium Planned for regular releases Specification: OpenAPI Specific to OpenAPI

Comments

@Stranger6667
Copy link
Member

Stranger6667 commented Sep 4, 2020

Currently, we have two filters - endpoint and method, but what if we want to test only GET /api/users and POST /api/orders? It could be somehow done with method=["GET", "POST"] and endpoint=["/api/users", "/api/orders"] but it will also select GET /api/orders which we might not want.

It would be nice if the endpoint option can accept a list of tuples, where each tuple is a pair of method and path, then it might be possible to select any specific endpoint for Open API.

Implementation notes

  • Update the type for BaseSchema.endpoint to include such tuples.
  • It might be easier to create a separate "filter" function in schemathesis.specs.openapi.filters that will accept the full path, method, and endpoints in this format
  • This function might be called in this condition and internally will be a no-op if endpoints are passed in the regular format.
  • At the same time, the current should_skip_endpoint function might be a no-op for this new format. The reason for this complication is to avoid extra work of resolving methods and dispatching the "before_process_path" hook.
@Stranger6667 Stranger6667 added Priority: Medium Planned for regular releases Type: Enhancement labels Sep 4, 2020
@Stranger6667 Stranger6667 modified the milestones: 3.6, 2.6, 2.7 Oct 3, 2020
@Stranger6667 Stranger6667 removed this from the 2.7 milestone Oct 20, 2020
@Stranger6667 Stranger6667 linked a pull request Aug 30, 2021 that will close this issue
18 tasks
@Stranger6667 Stranger6667 added this to the Schemathesis 4.0 milestone Feb 12, 2023
@Stranger6667 Stranger6667 modified the milestones: 4.0, 3.22 Oct 9, 2023
@Stranger6667 Stranger6667 removed this from the 3.24 milestone Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Intermediate Requires some experience Priority: Medium Planned for regular releases Specification: OpenAPI Specific to OpenAPI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant