webtau icon indicating copy to clipboard operation
webtau copied to clipboard

Swagger - error when asserting on fields not in schema

Open tsiq-karold opened this issue 5 years ago • 4 comments

If one is asserting that a field is null and makes a typo in the field name then the test will always pass even if the field comes back non-null.

We should validate that the assertion is being made against a field which is actually part of the schema. We will also need to provide a way to turn off this behaviour should someone really want to assert something that does not exist in the schema. e.g.

http.get('/foo') {
  suppressUnknownFieldErrors {
    somethingNotInSchema.should == 'foo'
  }
}

Related to #637 but we probably cannot handle this generically in HTTP because there may not be a schema.

tsiq-karold avatar Aug 18 '20 19:08 tsiq-karold

do you still need this one?

MykolaGolubyev avatar May 22 '21 18:05 MykolaGolubyev

I don't need it as such but I do think it would be a useful addition to webtau.

tsiq-karold avatar May 24 '21 08:05 tsiq-karold

I recall you had some implementation around it, is it still somewhere there?

MykolaGolubyev avatar May 24 '21 16:05 MykolaGolubyev

I do not recall that :)

tsiq-karold avatar May 24 '21 16:05 tsiq-karold

closing as not active

MykolaGolubyev avatar Jan 06 '23 17:01 MykolaGolubyev