pact-foundation / roadmap

Developer Relations @ Pact - Your map to the Pact landscape for all-comers (maintainers, contributors, users, newbies)
https://pact.io/
MIT License
39 stars 6 forks source link

List provider states for a provider #57

Open canny[bot] opened 4 days ago

canny[bot] commented 4 days ago

Re-using existing provider states can allow a new interaction to be successfully verified without having to make a change to the provider code. It is currently not easy to get a list of all the provider states for a particular provider. A new endpoint/CLI command would make it easy to discover and reuse provider states. https://github.com/pact-foundation/pact_broker/discussions/438

https://pact.canny.io/admin/board/feature-requests/p/list-provider-states-for-a-provider

canny[bot] commented 4 days ago

This issue has been linked to a Canny post: List provider states for a provider :tada:

YOU54F commented 4 days ago

Matt Fellows - February 9, 2022

See also this conversation in Slack: https://pact-foundation.slack.com/archives/C5F4KFKR8/p1643294644093300 The gist of it is, it would be helpful for consumers to be able to see the provider states when authoring tests, to reduce the coordination that needs to go on when authoring them. In an extreme version of this view, it could be that the provider advertises all of its available states, and the consumer contract could be validated prior to publishing that the states don't exist and the contract is invalid. I can see further possibilities of local code / IDE support to help this situation.