-
Notifications
You must be signed in to change notification settings - Fork 438
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
Raml as a contract #227
Raml as a contract #227
Conversation
Codecov Report
@@ Coverage Diff @@
## master #227 +/- ##
============================================
+ Coverage 57.59% 57.63% +0.04%
- Complexity 1418 1428 +10
============================================
Files 207 208 +1
Lines 6094 6251 +157
Branches 801 831 +30
============================================
+ Hits 3510 3603 +93
- Misses 2143 2188 +45
- Partials 441 460 +19
Continue to review full report at Codecov.
|
These are the greatest problems when working with RAML as input to SC-Contract. With those in place - is it even possible to use such a RAML file? cc @eddumelendez ChallengesThe biggest challenge in making RAML become an input for Spring Cloud Contract is that RAML is For the RAML contract be considered proper as input for Spring Cloud Contract it has to
If you have multiple examples of of bodies only the first one will be taken into consideration. |
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.
The following should be taken into account in the documentation.
-
According to the implementation request and response's body can support
defaultValue
,example
,examples
(first will be taken) -
The first response's status in the RAML file is taken.
certain conditions on the RAML contract to make the conversion work properly | ||
|
||
Spring Cloud Contract comes with an experimental out of the box support for https://raml.org/[RAML] representation of contracts. | ||
In other words instead of using the Groovy DSL you can use Pact files. In this section |
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.
RAML instead Pact
and feedback from the users we will try to minimize the number of constraints. | ||
|
||
For the RAML contract be considered proper as input for Spring Cloud Contract it has to | ||
pass the following tests: |
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.
satisfy the following conditions
sounds much better
In other words instead of using the Groovy DSL you can use Pact files. In this section | ||
we will present how to add such a support for your project. | ||
|
||
====== RAML constraints |
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.
RAML support limitations
really nice job @marcingrzejszczak !!! Thanks for continuing with this PR and sorry for the delay. |
@eddumelendez don't you think that work so many limitations this feature is useless? I have real doubts about merging this. The incompatibility of schemas vs what contact offers is gigantic... I'm very close of dropping the PR and writing that we're not supporting this. Do you have any arguments to not do this? :D |
@marcingrzejszczak To be honest, yes I think so. Maybe merging this can cause more issues than solutions because users will expect to use their existing RAML files. |
Ok! I'll move the PR as a separate project to |
Experimental version of Raml as a contract
TODO:
Fixes #129