Skip to content

Commit

Permalink
Updated the contract tests doc on responses in rows
Browse files Browse the repository at this point in the history
  • Loading branch information
joelrosario committed Nov 6, 2023
1 parent 8340e9f commit b78c8c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion documentation/contract_tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,9 @@ Specmatic validates each scenario to check if it is part of the OpenAPI Specific
* Add examples only where necessary, Specmatic can fill in the rest with auto generated values
* Scenario "**Get Employee Success**" - The path parameter id is a placeholder and the value for the same is the example row
* Scenario "**Get Employee Not Found Error**" - We have not added any examples because the value for the id parameter is already in the path instead of having a placeholder
* Scenario "**Update Employee Success**" - We have not added response examples, however Specmatic will still validate the response against the schema in our OpenAPI Specification
* Scenario "**Update Employee Success**" - We have not added response examples. Specmatic will validate the response against the schema in our OpenAPI Specification.
Note that the request in a contract test comes from the example, while the response comes from the application. The request is validated by Specmatic before it is sent, and the response returned by the application is validated against the specification. There is no need to provide any response examples in the example Gherkin rows.
We can add as many rows as necesary for our test cases. Example:
Expand Down

0 comments on commit b78c8c4

Please sign in to comment.