-
Notifications
You must be signed in to change notification settings - Fork 52
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
proxy server creates only the json file and not the yaml files which can not be stubbbed #1365
Comments
hello @GagandeepSharma060, thanks for reporting the issue. We will take a look |
Hi @GagandeepSharma060 , We tried to replicate the scenario where only JSON files are created without the YAML contract, but in our testing environment, both the examples and spec files are being generated correctly. To help us investigate this better, could you share:
I noticed you're using CTRL+C to generate the spec and examples. While this works, I wanted to share a more convenient approach that doesn't require stopping the proxy server: You can trigger the dump operation by sending a POST request to: /_specmatic/proxy/dump This endpoint is especially useful when:
For more details about proxy configuration and contract generation, please refer to our documentation: https://specmatic.io/documentation/authoring_contracts.html#dumping-the-contracts-and-examples-using-the-dump-endpoint Thanks, |
Hi @pranavgawri ,Apologies but I cannot provide u the code but can help u with a little more details The API that i am trying to record is being fetched by the UI from the configuration file in the sources SO the UI picks the API base url from configuration file in the network tab and makes request as per my activities on UI In this scenario whatever I do is recorded as stubs but no file is created. Can u check the reason. Thanks for the response |
Thanks for sharing the additional context. I've tested the contract generation following our standard documentation (https://specmatic.io/documentation/authoring_contracts.html#generating-api-specifications) and can confirm it's working as expected, generating both OAS specification and Examples (json) successfully. While testing, I did discover an interesting edge case, where I was able to replicate the scenario you reported. We're currently investigating the same. I'll update you once we have more findings to share. Thanks, |
Thanks @pranavgawri |
I have two services
I am using the specmatic proxy server on the API and then pointing my UI to the proxy.
Now I manually go to some pages on my UI do some CRUDs, when I press CNTR+C, only the JSON files are created and the yaml contract is not created.
So in this case the json files are of no use to me as they can not be stubbed without a contract
Please help here
THanks
The text was updated successfully, but these errors were encountered: