You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2022/09/23 08:56:14 UTC

[GitHub] [servicecomb-java-chassis] Github652911031 opened a new issue, #3361: 生成的服务契约和代码接口不一致

Github652911031 opened a new issue, #3361:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3361

   框架版本:
   java-chassis-bom 2.7.6
   
   问题:
   在接口中定义的请求参数类里,如果含有两个类名相同,但是类路径不一样的字段,生成的服务契约,和实际代码不一致。
   
   接口定义:
   ![image](https://user-images.githubusercontent.com/23067526/191922159-b034af26-35dd-498e-a4d5-952f168479bd.png)
   
   请求类:
   ![image](https://user-images.githubusercontent.com/23067526/191922958-4c9e0d94-3fe0-483a-8659-67e8e6da823c.png)
   innerClassList 中的InnerClass路径为com.xx.zy.provider.model.InnerClass,包含field3和field4两个字段
   
   ![image](https://user-images.githubusercontent.com/23067526/191923313-8d02e8bb-7339-4bba-bb8d-3cf21ed2d1e3.png)
   Context中也有一个List<InnerClass>, 字段名是innerClass,类路径com.xx.zy.provider.model.inner.InnerClass,包含field1和field2两个子弹
   ![image](https://user-images.githubusercontent.com/23067526/191923639-175bc5bd-1ea7-4c44-bca5-687683b17c07.png)
   
   ![image](https://user-images.githubusercontent.com/23067526/191925521-f47e12fc-d7f4-42e2-9376-48e644849f13.png)
   从看板上发现,生成的服务契约里面,只有一个InnerClass的定义(应该有两个),导致innerClass和innerClassList均指向了同一个InnerClass,和接口定义不符
   
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] Github652911031 closed issue #3361: 生成的服务契约和代码接口不一致

Posted by GitBox <gi...@apache.org>.
Github652911031 closed issue #3361: 生成的服务契约和代码接口不一致
URL: https://github.com/apache/servicecomb-java-chassis/issues/3361


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] Github652911031 commented on issue #3361: 生成的服务契约和代码接口不一致

Posted by GitBox <gi...@apache.org>.
Github652911031 commented on issue #3361:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3361#issuecomment-1255982876

   那请问我还有什么办法能够获取服务的接口契约么


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #3361: 生成的服务契约和代码接口不一致

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #3361:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3361#issuecomment-1322937479

   可以看下 `ServiceRegistryClient` , 会使用一些实现层面的API。 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] fanjiwang1992 commented on issue #3361: 生成的服务契约和代码接口不一致

Posted by GitBox <gi...@apache.org>.
fanjiwang1992 commented on issue #3361:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3361#issuecomment-1287592635

   > 那请问我还有什么办法能够获取服务的接口契约么
   
   你的意思是再消费端代码层面获取服务端的接口契约信息?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] Github652911031 commented on issue #3361: 生成的服务契约和代码接口不一致

Posted by GitBox <gi...@apache.org>.
Github652911031 commented on issue #3361:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3361#issuecomment-1288666298

   > > 那请问我还有什么办法能够获取服务的接口契约么
   > 
   > 你的意思是再消费端代码层面获取服务端的接口契约信息?
   
   不一定是在消费端,就是能够获取到正确的接口契约(yml格式)就行


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #3361: 生成的服务契约和代码接口不一致

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #3361:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3361#issuecomment-1255981403

   这种类名重复的情况会有问题,避免在一个 `RestSchema` 里面存在重复的model类名(package 不同, 类名一样)。 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] yanghao605 commented on issue #3361: 生成的服务契约和代码接口不一致

Posted by GitBox <gi...@apache.org>.
yanghao605 commented on issue #3361:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3361#issuecomment-1322883239

   > 不一定是在消费端,就是能够获取到正确的接口契约(yml格式)就行
   注册中心有获取契约的接口吧,直接从接口拿呗
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org