简体   繁体   English

当前一代的合同第一vs合同最后

[英]Contract First vs Contract last in current generation

The question might sound absurd. 这个问题听起来很荒谬。 Every where when I see the difference between Contract First and Contract Last, I see the word WSDL. 每当我看到“合同优先”和“合同最后”之间的区别时,都会看到WSDL这个词。

How does it fit in the current world of annotation and JSON Objects? 它如何适应当前的注释和JSON对象世界? Does it map like 它的地图是否像

Contract-First --> Use definitive Java class as Request Object Contract-last -> Use generic hashmap as Request Object 合同优先->使用确定的Java类作为请求对象合同后->使用通用哈希图作为请求对象

Instead of Contract First look for the synonym API First. 代替Contract First,先寻找同义词API First。 I use Swagger/ Open API Specification for that approach. 我将Swagger / Open API规范用于该方法。 As you tagged the question with CXF the Swagger2Feature might be interesting for you: http://cxf.apache.org/docs/swagger2feature.html 当您使用CXF标记问题时,Swagger2Feature可能对您很有趣: http ://cxf.apache.org/docs/swagger2feature.html

What you named Contract Last is Code First that means you write your Java classes first, annotate them and the Contract (WSDL, WADL, Swagger) will be generated afterwards. 命名为Contract Last的是“代码优先”,这意味着您首先编写Java类,对其进行批注,然后将生成Contract(WSDL,WADL,Swagger)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Spring 契约优先 REST - Spring contract-first REST Spring Boot和合约首先是Soap WebService - Spring Boot and contract first Soap WebService Spring 4 ws 合约第一个 webservice 意外元素 - Spring 4 ws contract first webservice unexpected element 如何通过Spring Cloud Contract Verifier跳过测试生成Maven目标? - How to skip the test generation maven goal with Spring Cloud Contract Verifier? 使用合同优先的Spring-WS完成的SOAP的Unmarshall异常 - Unmarshall exception for SOAP done with contract-first Spring-WS 以合同优先在CXF 3.0和Spring中启用警察 - Enable Police in CXF 3.0 and Spring with Contract-First 我可以配置Spring Cloud Contract Pact测试生成来处理URL路径中的上下文 - Can I configure the Spring Cloud Contract Pact test generation to handle a context in the URL path 与泽西岛的Spring Cloud合同 - Spring Cloud Contract with Jersey Spring Boot + Jetty + Jersey将无法启动:`创建FactoryDe​​scriptor必须将Factory作为第一个参数的合同。 - Spring Boot + Jetty + Jersey won't start up: `Creation of FactoryDescriptors must have Factory as a contract of the first argument` Spring Cloud Contract 在合约文件中使用 bodyFromFile 生成弱测试 - Spring Cloud Contract generates weak tests using bodyFromFile in contract file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM