You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the consumerVersionSelectors field, it is possible to specify an object with the following:
{
branch: 'master',
latest: true
}
However, the latest field only applies to tag(s) not branch(es). However, there was no complaints from TypeScript, so I was able to compile and run my provider test where it gave me a 400 error for having an improper client request.
Even though it was an oversight on my part, I think it would help future devs not make mistakes like this by updating the interfaces to disallow incompatible options from existing within the same context.
I think we could also do a better job of surfacing the errors in these cases. e.g. if I added the latest attribute to the deployed selector, it results in this error:
{
"errors": {
"consumerVersionSelectors": [
"cannot specify the field latest with the fields deployed/environment (at index 0)"
]
}
}
For the
consumerVersionSelectors
field, it is possible to specify an object with the following:However, the
latest
field only applies totag
(s) notbranch
(es). However, there was no complaints from TypeScript, so I was able to compile and run my provider test where it gave me a 400 error for having an improper client request.Even though it was an oversight on my part, I think it would help future devs not make mistakes like this by updating the interfaces to disallow incompatible options from existing within the same context.
See slack thread for additional context: https://pact-foundation.slack.com/archives/C9VBGLUM9/p1665548462892049
The text was updated successfully, but these errors were encountered: