-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
feat: add endpoint to create pacts, pacticipant, version, tags in one request #420
Conversation
@@ -0,0 +1,38 @@ | |||
RSpec.describe "publishing a pact using the all in one endpoint" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example of how it will work here.
:buildUrl => "http://ci/builds/1234", | ||
:contracts => [ | ||
{ | ||
:role => "consumer", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the field "role". We need some way of saying "is this a consumer defined contract or a provider defined contract". "Type" is such an overloaded, non-descriptive term. "contractAuthor" sounds like it's a person. "contractSpecifier" also. "contractSource"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mefellows @TimothyJones thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
role made sense to me, it was clear was what it was when I saw the value for it
:buildUrl => "http://ci/builds/1234", | ||
:contracts => [ | ||
{ | ||
:role => "consumer", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
role made sense to me, it was clear was what it was when I saw the value for it
After chatting with Tim, I've dropped the "role" field in favour of just explicitly setting the consumer name and provider name for each contract. I prefer this because it doesn't introduce any new terminology. It does seem redundant to set the consumer and provider names in the contract metadata as well as in the content, but this endpoint will be modified to allow publication of OAS documents and other types in the future, where the contract content will not contain the consumer and provider names. |
@uglyog I've base64 encoded the content for various reasons, one of which is so that we can publish non-utf8 contracts if need be. Can you see this being useful? Or is that covered by encoding the interaction/message contents in the contract itself? |
I can't see a need for it, all the forms I know of will either be JSON or YAML. Even SCC is Groovy code, I think. But it doesn't hurt. |
This is often mistaken for a contract version number.
Ok. Sorry, this is another big one @uglyog, but feel free to gloss over the implementation. The important things to know are:
|
No description provided.