[英]can spring cloud contract handle repeated request with different response?
for example: both contracts will be calling /api/checkResult例如:两个合约都将调用 /api/checkResult
first contract will return a list of result while the latter returning no result (it can happen)第一个合同将返回结果列表,而后者不返回任何结果(这可能发生)
there's no query string or parameters passed in.没有传入查询字符串或参数。
I have tried to applied priority but it didnt work, and it always matched to the one with results.我曾尝试应用优先级,但它没有用,而且它总是与有结果的那个相匹配。
Any idea on how I can proceed?关于如何进行的任何想法?
Yes it's called scenarios or stateful contracts.是的,它被称为场景或有状态合同。 Please read this section of the docs to learn more https://docs.spring.io/spring-cloud-contract/docs/current/reference/html/project-features.html#contract-stateful-contracts请阅读文档的这一部分以了解更多信息https://docs.spring.io/spring-cloud-contract/docs/current/reference/html/project-features.html#contract-stateful-contracts
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.