As mentioned in the title while running specmatic contract tests against java spring api, instead of using the payload examples for request and response, specmatic uses auto-generated payload with random values.
Steps to reproduce
Implement a simple CRUD api in any language you prefer based on the attached yaml.
run following command java -jar specmatic.jar test src/main/resources/openapi.yaml --testBaseURL=http://localhost:3000 to test your api.
Observe the test payload that differes from the examples specified in the openapi.yaml file.
Expected behavior
Test payload equals what I specified in the examples section of the api description in the openapi.yaml file.
For the POST and GET endpoints I specified example payloads similarly as described in this article (chapter PetStore API Specification): https://specmatic.io/getting_started.html and expected my examples to be used for the test, resulting in success.
Description
As mentioned in the title while running specmatic contract tests against java spring api, instead of using the payload examples for request and response, specmatic uses auto-generated payload with random values.
Steps to reproduce
java -jar specmatic.jar test src/main/resources/openapi.yaml --testBaseURL=http://localhost:3000
to test your api.Expected behavior Test payload equals what I specified in the examples section of the api description in the openapi.yaml file. For the POST and GET endpoints I specified example payloads similarly as described in this article (chapter PetStore API Specification): https://specmatic.io/getting_started.html and expected my examples to be used for the test, resulting in success.
System Information:
Thanks a lot in advance and best regards