-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
tests: add OasstApiClient contract tests #216
Conversation
the previous iteration of this script which used wiremock threw a null pointer exception.
This is required for output validation and for the mock server.
@@ -204,7 +204,7 @@ def tasks_acknowledge_failure( | |||
raise OasstError("Failed to not acknowledge task.", OasstErrorCode.TASK_NACK_FAILED) | |||
|
|||
|
|||
@router.post("/interaction") | |||
@router.post("/interaction", response_model=protocol_schema.TaskDone) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yk note on how to specify multiple possible response_models: https://stackoverflow.com/questions/72919006/is-there-any-way-to-have-multiple-response-models-in-fastapi-openapi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining question about the best location for the print-api call .. but overall approved.
Fixes #205
Not in this PR but will complete in my next PR: adding a github workflow which automatically runs the tests for each PR and push.