chore(server): update swagger info for default server profile by SunnyBoy-WYH · Pull Request #2423 · apache/hugegraph

@SunnyBoy-WYH

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

@SunnyBoy-WYH

@dosubot dosubot bot added size:XS

This PR changes 0-9 lines, ignoring generated files.

api

Changes of API

labels

Jan 19, 2024

@SunnyBoy-WYH

@codecov

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#/";

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

VGalaxies

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

@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

@SunnyBoy-WYH

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

imbajin

Choose a reason for hiding this comment

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

good

VGalaxies

Choose a reason for hiding this comment

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

LGTM~

VGalaxies pushed a commit that referenced this pull request

Jan 29, 2024

@SunnyBoy-WYH @VGalaxies