Skip to content
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

Unclear what matchers are compatible with the PactV3 interface #957

Open
mefellows opened this issue Oct 3, 2022 · 1 comment
Open

Unclear what matchers are compatible with the PactV3 interface #957

mefellows opened this issue Oct 3, 2022 · 1 comment
Labels
enhancement Indicates new feature requests question Indicates that an issue, pull request, or discussion needs more information

Comments

@mefellows
Copy link
Member

The Pact V3 interface allows you to update the specification that you serialise to different versions, but it's unclear what Matchers should be used in that case.

i.e. it's possible to do:

const provider = new PactV3({
  consumer: 'consumer',
  provider: 'provider',
  spec: SpecificationVersion.SPECIFICATION_VERSION_V2
});

along side:

import { fromProviderState } from '@pact-foundation/pact/src/v3/matchers';

fromProviderState is not a valid matcher for the V2 specification as it's a V3 only matcher.

It should be clear and obvious what matchers can be used on the interface, and ideally constrained by types.

See this slack thread for context.

@YOU54F
Copy link
Member

YOU54F commented Oct 17, 2022

ahhh, I can see why this is causing confusion even more so, when reading this

pact-foundation/pact-ruby#276

Does the PactV3 interface, with the spec version v2, generate a v2 compliant spec, or just set the version to 2.0.0 in the spec. I assumed the PactV3 interface would generate v3 (or possibly) v4 pact specs in the future.

Fair bit of cognitive load required on the users part.

@mefellows mefellows added question Indicates that an issue, pull request, or discussion needs more information enhancement Indicates new feature requests labels Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates new feature requests question Indicates that an issue, pull request, or discussion needs more information
Projects
Status: New Issue
Development

No branches or pull requests

2 participants