-
Notifications
You must be signed in to change notification settings - Fork 194
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
feat: add assert_operation_response, assert_raw_schema #545
feat: add assert_operation_response, assert_raw_schema #545
Conversation
…/open_api_spex into ms/operation-based-assertions
This would really help in our case. Aside from operationIds, we define our spec file manually and put responses at For JSON:API, this lets us define standard, top level attributes in the response, like |
@zorbash Updated to address feedback, thanks! |
This is a small proposal to add a few things to help with testing based on
operationId
s instead of (or along side of)schema_name
s. There are a few benefits to this, but the primary one is that it enforcesoperationId
usage. Most organizations that deal with any type of code generation are going to most likely want to enforce operationIds.I thought about just looking at the path in(i was able to achieve this very simply by assigning the operation_id. it now supports automatic inference or manual specification)conn
and resolving backwards with a method likeassert_uses_schema
, but that was a bit too 🪄 for what I wanted to achieve.I'm sure I've missed something here, but very open to feedback if anyone else would benefit from this 🎉