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

Implement required/optional parameters check #66

Closed
Stranger6667 opened this issue Sep 24, 2019 · 1 comment
Closed

Implement required/optional parameters check #66

Stranger6667 opened this issue Sep 24, 2019 · 1 comment
Labels
Priority: Medium Planned for regular releases Type: Feature New functionalities or enhancements

Comments

@Stranger6667
Copy link
Member

Stranger6667 commented Sep 24, 2019

The current behavior is based on having data that matches the given schema. But we need to go beyond this point:

Check if required parameters are really required; Should fail if some param is actually optional;
Check if optional parameters are really optional; Should fail if some param is actually required;
One of the possible ways to achieve this is to adjust the schema in runtime before creating a strategy for it. For example (1) we need to change the schema and remove required parameters or its subset completely, for (2) removing the value should not lead to failure.

Mentioned approaches could be extracted on a separate level - we could have one extra parametrization level that will include these things:

  • Current. Test data matches the schema; No runtime schema changes;
  • (1) Test data doesn't match the schema - required fields are not present and the endpoint is expected to fail because of this reason. Required fields are removed.
  • (2) Test data matches the schema - missing the fields should not lead to an error. Optional fields are removed.

We could produce these 3 dimensions by default:

  • method
  • endpoint
  • test type (from the mentioned above)

This will expand the scope of problems Schemathesis can verify

@Stranger6667 Stranger6667 added Priority: Medium Planned for regular releases Type: Feature New functionalities or enhancements and removed enhancement labels Oct 2, 2019
@Stranger6667 Stranger6667 modified the milestone: 0.10.0 Oct 4, 2019
@Stranger6667
Copy link
Member Author

It is a part of #65

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium Planned for regular releases Type: Feature New functionalities or enhancements
Projects
None yet
Development

No branches or pull requests

1 participant