Skip to content

Comments

chore(server): update swagger info for default server profile#2423

Merged
VGalaxies merged 3 commits intoapache:masterfrom
SunnyBoy-WYH:swagger-tip
Jan 28, 2024
Merged

chore(server): update swagger info for default server profile#2423
VGalaxies merged 3 commits intoapache:masterfrom
SunnyBoy-WYH:swagger-tip

Conversation

@SunnyBoy-WYH
Copy link
Contributor

Purpose of the PR

  • close #xxx

Main Changes

Verifying these changes

  • Trivial rework / code cleanup without any test coverage. (No Need)
  • Already covered by existing tests, such as (please modify tests here).
  • Need tests and can be verified as follows:
    • xxx

Does this PR potentially affect the following parts?

  • Nope
  • Dependencies (add/update license info)
  • Modify configurations
  • The public API
  • Other affects (typed here)

Documentation Status

  • Doc - TODO
  • Doc - Done
  • Doc - No Need

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. api Changes of API labels Jan 19, 2024
@codecov
Copy link

codecov bot commented Jan 19, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (1dd0580) 66.32% compared to head (b0e1036) 66.22%.
Report is 1 commits behind head on master.

Files Patch % Lines
...a/org/apache/hugegraph/api/profile/ProfileAPI.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2423      +/-   ##
============================================
- Coverage     66.32%   66.22%   -0.11%     
  Complexity      828      828              
============================================
  Files           511      511              
  Lines         42596    42597       +1     
  Branches       5942     5942              
============================================
- Hits          28253    28210      -43     
- Misses        11547    11577      +30     
- Partials       2796     2810      +14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

imbajin
imbajin previously approved these changes Jan 22, 2024
private static final String SERVICE = "hugegraph";
private static final String DOC = "https://hugegraph.apache.org/docs/";
private static final String API_DOC = DOC + "clients/";
private static final String SWAGGER_UI = "http://{domain/ip}:{port}/swagger-ui/index.html#/";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we need/keep # in the end? (whats for?_

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 22, 2024
Copy link
Contributor

@VGalaxies VGalaxies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SunnyBoy-WYH Is this as expected?

> curl http://localhost:8080/
{"service":"hugegraph","version":"1.2.0","doc":"https://hugegraph.apache.org/docs/","api_doc":"https://hugegraph.apache.org/docs/clients/","swagger_ui":"http://{domain/ip}:{port}/swagger-ui/index.html#/","apis":["arthas","auth","cypher","filter","graph","gremlin","job","metrics","profile","raft","resources","schema","traversers","variables"]}

Is there a way to fill the ip and port in swagger_ui here?

@imbajin
Copy link
Member

imbajin commented Jan 24, 2024

@SunnyBoy-WYH Is this as expected?

> curl http://localhost:8080/
{"service":"hugegraph","version":"1.2.0","doc":"https://hugegraph.apache.org/docs/","api_doc":"https://hugegraph.apache.org/docs/clients/","swagger_ui":"http://{domain/ip}:{port}/swagger-ui/index.html#/","apis":["arthas","auth","cypher","filter","graph","gremlin","job","metrics","profile","raft","resources","schema","traversers","variables"]}

Is there a way to fill the ip and port in swagger_ui here?

Good suggestion, maybe it's better to get the uri info from server status or use default IP:Port for it?

@SunnyBoy-WYH
Copy link
Contributor Author

@SunnyBoy-WYH Is this as expected?

> curl http://localhost:8080/
{"service":"hugegraph","version":"1.2.0","doc":"https://hugegraph.apache.org/docs/","api_doc":"https://hugegraph.apache.org/docs/clients/","swagger_ui":"http://{domain/ip}:{port}/swagger-ui/index.html#/","apis":["arthas","auth","cypher","filter","graph","gremlin","job","metrics","profile","raft","resources","schema","traversers","variables"]}

Is there a way to fill the ip and port in swagger_ui here?

Good suggestion, maybe it's better to get the uri info from server status or use default IP:Port for it?

Yes, we can just use rest server url .

Copy link
Member

@imbajin imbajin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

Copy link
Contributor

@VGalaxies VGalaxies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM~

@VGalaxies VGalaxies merged commit 1d4532c into apache:master Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Changes of API lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants