New all-in-one contract publishing endpoint #413
bethesque
started this conversation in
New Features
Replies: 2 comments 1 reply
-
@uglyog thoughts? |
Beta Was this translation helpful? Give feedback.
1 reply
-
PR opened here #420 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
At the moment, to publish a pact with tags and a branch or other information, multiple calls are required - one for each tag (has to be done first), one if there is a branch or build URL (to create the version resource) and one to create the pact.
Problems with this approach:
I would like to create a new, all in one, publishing endpoint. REST doesn't really make sense to me in this situation, as the call will create multiple resources, and there isn't really a good use case for keeping and returning all this data together, so I think just using an RPC style call would be more appropriate.
This would return a response that had links to all the created resources (and anything else that would be useful):
After publishing with this endpoint, the rest of the resources would look the same as they do using the current approach.
Another benefit of this new format is that we could easily add support for publishing different types of contracts, and by exchanging "consumerXXX" for "providerXXX" we can easily support provider published contracts the same way.
Technical background on why this is useful right now in the context of the new branches/environments support:
Future benefits
Beta Was this translation helpful? Give feedback.
All reactions