You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/01/14 19:11:45 UTC

[GitHub] [iotdb] jixuan1989 opened a new pull request #2497: Using openapi to generate rest framework (go and java) codes

jixuan1989 opened a new pull request #2497:
URL: https://github.com/apache/iotdb/pull/2497


   ## Description
   
   OpenAPI is a uniform DSL for describing the restful interface. 
   And, when developing a restful framework, we have to write many trivial codes (that will be also written in almost all restful services). So, generating such of codes is a good solution as we just need to develop the real logic and do not need to care to maintain the generated codes.
   
   This PR defines several restful APIs for serving Grafana and Prometheus, and uses openapi-generator to generate the source codes of the restful framework in Go and Java. (The generator can also generate client-sdk, but I have not time to try it and we have no requirements).
   
   So, just run `mvn generate-sources` in `openapi' module, and then develop your logic in 
   `openapi/java-rest/src/main/java/org/apache/iotdb/openapi/gen/handler/impl/V1ApiServiceImpl.java`  (for java) and `openapi/go-rest/src/iotdbrestimpl/api_service_impl.go`(for Go).
   
   The only two things are, 
   
   1. current openapi-generator has some bug for go-server codes, see: https://github.com/OpenAPITools/openapi-generator/issues/8448 and I have write how to fix it manually in go-rest/README.md
   
   2. current openapi-generator can not generate java codes using native Netty. But it seems developing such a generator is not easy for openapi-generator.
   
   The author of PR https://github.com/apache/iotdb/pull/2400 can consider to using this generated Go-server codes. (or, do some experiments to check whether the generated codes have an acceptable performance).
   
   


----------------------------------------------------------------
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.

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



[GitHub] [iotdb] sonarcloud[bot] commented on pull request #2497: Using openapi to generate rest framework (go and java) codes

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #2497:
URL: https://github.com/apache/iotdb/pull/2497#issuecomment-761762918


   Kudos, SonarCloud Quality Gate passed!
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug.png' alt='Bug' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2497&resolved=false&types=BUG) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2497&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2497&resolved=false&types=BUG)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability.png' alt='Vulnerability' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2497&resolved=false&types=VULNERABILITY) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2497&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2497&resolved=false&types=VULNERABILITY)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot.png' alt='Security Hotspot' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=2497&resolved=false&types=SECURITY_HOTSPOT) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=2497&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=2497&resolved=false&types=SECURITY_HOTSPOT)  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell.png' alt='Code Smell' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2497&resolved=false&types=CODE_SMELL) [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A.png' alt='A' width='16' height='16' />](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2497&resolved=false&types=CODE_SMELL) [4 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=2497&resolved=false&types=CODE_SMELL)
   
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo.png' alt='No Coverage information' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2497) No Coverage information  
   [<img src='https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3.png' alt='0.0%' width='16' height='16' />](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2497&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=2497&metric=new_duplicated_lines_density&view=list)
   
   


----------------------------------------------------------------
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.

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



[GitHub] [iotdb] jixuan1989 closed pull request #2497: Using openapi to generate rest framework (go and java) codes

Posted by GitBox <gi...@apache.org>.
jixuan1989 closed pull request #2497:
URL: https://github.com/apache/iotdb/pull/2497


   


-- 
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: reviews-unsubscribe@iotdb.apache.org

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



[GitHub] [iotdb] jixuan1989 commented on pull request #2497: Using openapi to generate rest framework (go and java) codes

Posted by GitBox <gi...@apache.org>.
jixuan1989 commented on pull request #2497:
URL: https://github.com/apache/iotdb/pull/2497#issuecomment-878719954


   has been merged into https://github.com/apache/iotdb/pull/3299


-- 
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: reviews-unsubscribe@iotdb.apache.org

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



[GitHub] [iotdb] icloudsong commented on pull request #2497: Using openapi to generate rest framework (go and java) codes

Posted by GitBox <gi...@apache.org>.
icloudsong commented on pull request #2497:
URL: https://github.com/apache/iotdb/pull/2497#issuecomment-823200421


   Does it support REST API for https?


-- 
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.

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