-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
Print out a template for new provider states #692
Comments
Hmmm. I like this idea, but I'm not sure that it's very easy to do in a way that will always play well with the user's code in javascript. I suppose we could assume they're doing it the most straightforward way, and anyone who has created their own way of doing things won't need it? |
I'm thinking from a "I'm a brand new user and don't know what to do next" perspective. I've been doing some work in the broker that detects what things are present in the data (eg. is there a webhook, are there any verification results at all) and then tells them what to do next (eg. you need to set up a webhook, you need to create a provider build). eg. This is the output for the new contract publishing endpoint
If there's a best practice, simplest way to do provider states, then that would be what to show. You can always include a link to more docs that would show how to do advanced cases, but if the user was already doing advanced stuff, they probably wouldn't need the output to tell them what to do anyway. |
Right, that makes sense. I like this idea. A related idea could be “generate the provider states that are in this pact”, but I guess you’d get that on the first run if we had this feature. |
I think we could just provide the following:
|
So, pact-js might already do this, so just close this issue if it already does, but this is what Pact Ruby prints out if there are missing provider states. Is it possible for pact-js to do the same?
The text was updated successfully, but these errors were encountered: