Re: [I] [Feature][3.3] Enhance JsonCompatibilityUtil to support triple protocol [dubbo]
oxsean commented on issue #13963: URL: https://github.com/apache/dubbo/issues/13963#issuecomment-2104776795 @AlbumenJ Sorry for later to noticed this Should the focus be on leveraging JsonCompatibilityUtil in TripleProtocol to check compatibility? This should already be available. Generating the demo json structure may not be needed currently, but it could be useful for future support of OpenAPI. -- 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: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org
Re: [I] [Feature][3.3] Enhance JsonCompatibilityUtil to support triple protocol [dubbo]
hengyoush commented on issue #13963: URL: https://github.com/apache/dubbo/issues/13963#issuecomment-2042563064 > > Before I start, I have some questions about this issue: > > > > * Check all the types that Dubbo can support: I guess the current JsonCompatibilityUtil already has the functionality to check the compatibility of classes. Is it the same usage as JsonCompatibilityUtil in RestProtocol, and should we also use JsonCompatibilityUtil to do the same thing in TripleProtocol? > > > > ```java > > // this is the JsonCompatibilityUtil in RestProtocol > > private void checkJsonCompatibility(Class clazz, String jsonCheckLevel) throws RpcException { > > > > if (jsonCheckLevel == null || JSON_CHECK_LEVEL_WARN.equals(jsonCheckLevel)) { > > // > > List unsupportedMethods = JsonCompatibilityUtil.getUnsupportedMethods(clazz); > > } else if (JSON_CHECK_LEVEL_STRICT.equals(jsonCheckLevel)) { > > // ... > > } > > } > > ``` > > > > > > > > > > > > > > > > > > > > > > > > > > * Generate the demo json struct: Does JsonCompatibilityUtil need to generate corresponding sample JSON structures based on interface parameters during the validation process? > > * In TripleProtocol > * No. This is a explict feature. @oxsean Do you have any ideas? I have completed the 1. and 3, but I am still confused about the second(**Generate the demo json struct**). Assuming we have a class like: ``` public class DemoClass { private String str; private Set set; } ``` and get a String through `String demoStruct = JsonCompatibilityUtil.generateDemoJsonStruct(Class clazz)`: ``` { "str": "foobar", "set": ["v1", "v2"] } ``` Is my understanding correct? -- 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: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org
Re: [I] [Feature][3.3] Enhance JsonCompatibilityUtil to support triple protocol [dubbo]
AlbumenJ commented on issue #13963: URL: https://github.com/apache/dubbo/issues/13963#issuecomment-2031192922 > Before I start, I have some questions about this issue: > > * Check all the types that Dubbo can support: I guess the current JsonCompatibilityUtil already has the functionality to check the compatibility of classes. Is it the same usage as JsonCompatibilityUtil in RestProtocol, and should we also use JsonCompatibilityUtil to do the same thing in TripleProtocol? > > ```java > // this is the JsonCompatibilityUtil in RestProtocol > private void checkJsonCompatibility(Class clazz, String jsonCheckLevel) throws RpcException { > > if (jsonCheckLevel == null || JSON_CHECK_LEVEL_WARN.equals(jsonCheckLevel)) { > // > List unsupportedMethods = JsonCompatibilityUtil.getUnsupportedMethods(clazz); > } else if (JSON_CHECK_LEVEL_STRICT.equals(jsonCheckLevel)) { > // ... > } > } > ``` > > * Generate the demo json struct: Does JsonCompatibilityUtil need to generate corresponding sample JSON structures based on interface parameters during the validation process? - In TripleProtocol - No. This is a explict feature. @oxsean Do you have any ideas? -- 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: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org
Re: [I] [Feature][3.3] Enhance JsonCompatibilityUtil to support triple protocol [dubbo]
hengyoush commented on issue #13963: URL: https://github.com/apache/dubbo/issues/13963#issuecomment-2029684720 Before I start, I have some questions about this issue: - Check all the types that Dubbo can support: I guess the current JsonCompatibilityUtil already has the functionality to check the compatibility of classes. Is it the same usage as JsonCompatibilityUtil in RestProtocol, and should we also use JsonCompatibilityUtil to do the same thing in TripleProtocol? ```java // this is the JsonCompatibilityUtil in RestProtocol private void checkJsonCompatibility(Class clazz, String jsonCheckLevel) throws RpcException { if (jsonCheckLevel == null || JSON_CHECK_LEVEL_WARN.equals(jsonCheckLevel)) { // List unsupportedMethods = JsonCompatibilityUtil.getUnsupportedMethods(clazz); } else if (JSON_CHECK_LEVEL_STRICT.equals(jsonCheckLevel)) { // ... } } ``` - Generate the demo json struct: Does JsonCompatibilityUtil need to generate corresponding sample JSON structures based on interface parameters during the validation process? -- 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: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org
Re: [I] [Feature][3.3] Enhance JsonCompatibilityUtil to support triple protocol [dubbo]
CrazyHZM commented on issue #13963: URL: https://github.com/apache/dubbo/issues/13963#issuecomment-2017153777 @hengyoush Go ahead -- 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: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org
Re: [I] [Feature][3.3] Enhance JsonCompatibilityUtil to support triple protocol [dubbo]
hengyoush commented on issue #13963: URL: https://github.com/apache/dubbo/issues/13963#issuecomment-2014542238 I can try solve it, please assign to me -- 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: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org
[I] [Feature][3.3] Enhance JsonCompatibilityUtil to support triple protocol [dubbo]
AlbumenJ opened a new issue, #13963: URL: https://github.com/apache/dubbo/issues/13963 ### Pre-check - [X] I am sure that all the content I provide is in English. ### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar feature requirement. ### Apache Dubbo Component Java SDK (apache/dubbo) ### Descriptions Enhance JsonCompatibilityUtil to support triple protocol none-annotation mode (`application/json`) - Check all the type that Dubbo can support - Generate the demo json struct - Log warn to notify users that this object might to compatiable with triple none-annotation mode ### Related issues _No response_ ### Are you willing to submit a pull request to fix on your own? - [ ] Yes I am willing to submit a pull request on my own! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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: notifications-unsubscr...@dubbo.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org - To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org