spring-cloud-contract

Is there a way to convert an OpenAPI specification to a spring cloud contract?

非 Y 不嫁゛ 提交于 2019-12-24 23:44:14
问题 I'm trying to convert an openAPI specification (written in yaml) into a spring cloud contract YAML DSL. Is there any plugin that could do this type of conversion? 回答1: Yes you can. Please read this blog post on how to encorporate the yaml contract inside the openapi spec https://springframework.guru/defining-spring-cloud-contracts-in-open-api/ 来源: https://stackoverflow.com/questions/56989445/is-there-a-way-to-convert-an-openapi-specification-to-a-spring-cloud-contract

Spring Cloud Contract and plain Spring AMQP

孤者浪人 提交于 2019-12-23 03:38:12
问题 We are using plain Spring AMQP in our spring boot projects. We want to make sure that our message consumers can test against real messages and avoid to test against static test messages. Thus our producers could generate message snippets in a test phase that can be picked up by the consumer test to make sure it tests against the latest message version and see if changes in the producer break the consumer. It seems like Spring Cloud Contract does exactly that. So is there a way to integrate

Spring Cloud Contract support for Node JS?

送分小仙女□ 提交于 2019-12-12 18:03:56
问题 Is there a Verifier equivalent on the JS Node side? Is it possible to write Rest API test in JS Node that can access the stubs? 回答1: Currently we don't support the tests generation out of the box. However since sc contract is pluggable (https://cloud.spring.io/spring-cloud-contract/spring-cloud-contract.html#_pluggable_architecture) there's no problem to write a test generator that will generate a node js test. If that's not acceptable for you you can check out Pact and use their api. SC

Spring Cloud Contract remote artifact download clashes with local, how to make it temporary?

蹲街弑〆低调 提交于 2019-12-11 17:48:06
问题 I am having an issue with Spring Cloud Contracts 2.0.0.M6, or there is something I must be misunderstanding about how to properly configure the stub runner tests. I want to always download the artifact remotely, so I have set stubsMode to REMOTE . When I run the test locally where I have the artifact in my .m2 directory, it fails. That's fine, and I can understand points made by one of the authors here. The issue I have is that when I delete the local stub jars, and run the test case, the

Spring Cloud Contract issues retrieving stubs from Artifactory

橙三吉。 提交于 2019-12-07 12:48:12
问题 I have tests for two consumers and a producer working fine offline but the consumer tests fail when I change them for retrieving the stubs from Artifactory. This is the code for working offline: @RunWith(SpringRunner.class) @SpringBootTest(classes = ContractTestConfiguration.class, webEnvironment = SpringBootTest.WebEnvironment.NONE) @AutoConfigureStubRunner(ids = {"com.mycompany:service-name:+:stubs"}, workOffline = true) @ImportAutoConfiguration(org.springframework.cloud.stream.test.binder

Spring Cloud Contract issues retrieving stubs from Artifactory

时光毁灭记忆、已成空白 提交于 2019-12-05 21:36:58
I have tests for two consumers and a producer working fine offline but the consumer tests fail when I change them for retrieving the stubs from Artifactory. This is the code for working offline: @RunWith(SpringRunner.class) @SpringBootTest(classes = ContractTestConfiguration.class, webEnvironment = SpringBootTest.WebEnvironment.NONE) @AutoConfigureStubRunner(ids = {"com.mycompany:service-name:+:stubs"}, workOffline = true) @ImportAutoConfiguration(org.springframework.cloud.stream.test.binder.TestSupportBinderAutoConfiguration.class) @DirtiesContext public class MyContractTest And this is for