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

Combine message and rest interactions in the same file #79

Closed
uglyog opened this issue Sep 19, 2020 · 1 comment
Closed

Combine message and rest interactions in the same file #79

uglyog opened this issue Sep 19, 2020 · 1 comment

Comments

@uglyog
Copy link
Member

uglyog commented Sep 19, 2020

There has been a few requests to be able to store different types of interactions in the same pact file.

There are two main ways these could be stored:

Interactions keyed by type

The interactions section could be changed to something like:

{
  "interactions": {
    "request/response": [ ... ],
    "message": [ ... ],
    ...
  }
}

Interactions with a type attribute

This model is preferred by people who use serialising frameworks (usually based on annotations) because it is easy to model with polymorphism. So this would be:

{
    "interactions": [
        {
            "type": "request/response",
            ...
        },
       ...
    ]
}
@uglyog
Copy link
Member Author

uglyog commented Oct 5, 2020

Decision is to go with interactions with a type attribute, as this makes it easier to add new types of interactions in the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant