apache / incubator-hugegraph

A graph database that supports more than 100+ billion data, high performance and scalability (Include OLTP Engine & REST-API & Backends)
https://hugegraph.apache.org
Apache License 2.0
2.63k stars 517 forks source link

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

Closed SunnyBoy-WYH closed 8 months ago

SunnyBoy-WYH commented 8 months ago

Purpose of the PR

Main Changes

Verifying these changes

Does this PR potentially affect the following parts?

Documentation Status

codecov[bot] commented 8 months ago

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 :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

imbajin commented 8 months ago

@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 commented 8 months ago

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