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