snok/drf-openapi-tester

requestBody schema testing

Opened this issue · 4 comments

We noticed in our OAS testing that the requestBody schema is not tested. For example if the post.requestBody is removed from a path (that expects a requestBody) in the OAS, there is no schema checking here and tests pass. Similarly if the requestBody is incorrect, the tests also still pass.

Is there scope to include such a test in this package?

Thanks!

Yes, that sounds like it should happen. Since I'm no longer using this package myself, would you want to help maintain the package doing forward @darduf? I could give you push access, and I could help review changes, but let you add features like this, if you're interested?

Thanks for the offer @sondrelg. I don't currently have the bandwidth to maintain the package, but would be open to contribute to the package as previously done on fixes.

Since I'm no longer using this package myself,

Out of interest, what are you using for this type of OAS testing?

I'm no longer working on an API first Django backend, otherwise I likely would be 👍 Otherwise I think schemathesis might provide similar benefits

Hi @sondrelg @darduf, as I'm currently using this for my project I also found useful to have requestBody validated within the client.
I decided to add the feature and created a PR for it, would be great if you could give it a check :)

Thanks!