简体   繁体   English

spring 云合同可以处理具有不同响应的重复请求吗?

[英]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.

相关问题 我们可以将spring cloud contract请求/响应属性设为可选吗? - can we make spring cloud contract request/response attribute optional? 如何通过spring-cloud-contract获得对先前请求的响应 - How to get a response of the previous request with spring-cloud-contract Spring Cloud Contracts 可以处理具有不同返回 http 状态码的重复请求吗? - Can Spring Cloud Contracts handle repeated requests with different return http status codes? 无法在Spring Cloud Contract中发送过帐请求 - Unable to send the post request in spring cloud contract Spring Cloud Contract:从场景中的先前响应获取参数 - Spring cloud contract: get params from previous response in scenario Spring 云合同、正文和执行方法未验证响应 - Spring Cloud Contract, body and execute method is not validating the response 使用Spring Cloud Stream的Spring REST请求响应 - Spring REST Request Response with Spring Cloud Stream Spring 云合同 - 在响应请求中重新使用路径变量 - Spring Cloud Contract - Re-use path variable in request for repsonse Spring Cloud Contract:为期望不同或部分不同的多个消费者编写合同测试 - Spring Cloud Contract : Write Contract Test for multiple consumer with different or partially different expectations 如何在 Spring Cloud Contract Groovy DSL Contract 定义中将请求正文对象属性定义为可为空? - How define request body object property as nullable in Spring Cloud Contract Groovy DSL Contract definition?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM