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

Feature/publish to broker #1199

Merged
merged 6 commits into from
Sep 5, 2020

Conversation

markozz
Copy link
Contributor

@markozz markozz commented Aug 26, 2020

Hi,

With this pull request I would like to contribute the following feature to the pact-JVM-server;

  • publish a contract which is created on disk to a pact broker.

By running the pact-jvm-server with parameter -b "https://valid.pact.broker.com" and optionally -t "val!dT0ken" a call to the endpoint /publish will push the contract from disk to the broker.

Please let me know what you think!

Kind regards,

Mark

@uglyog
Copy link
Member

uglyog commented Aug 30, 2020

LGTM.

There is a PactBrokerClient class in core/pactbroker module that would be better to use, as it uses HAL links navigation instead of templating the URI and also supports tagging the pact version.

Here is an example of it being used.

I guess the tags would be an extra attribute on the body.

@markozz
Copy link
Contributor Author

markozz commented Sep 3, 2020

Hi, implemented your suggestions.

@uglyog
Copy link
Member

uglyog commented Sep 5, 2020

Awesome, thanks!

@uglyog uglyog merged commit ec3c777 into pact-foundation:master Sep 5, 2020
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

Successfully merging this pull request may close these issues.

2 participants