Update swagger-initializer.js#2543
Merged
andrewsykim merged 3 commits intoray-project:masterfrom Dec 11, 2024
Merged
Conversation
metasyn
commented
Nov 14, 2024
Comment on lines
-102
to
-128
| ```javascript | ||
| window.onload = function() { | ||
| //<editor-fold desc="Changeable Configuration Block"> | ||
|
|
||
| // the following lines will be replaced by docker/configurator, when it runs in a docker-container | ||
| window.ui = SwaggerUIBundle({ | ||
| spec: location.host, | ||
| urls: [{"url":"http://"+location.host+"/swagger/serve.swagger.json","name":"RayServe Service"}, | ||
| {"url":"http://"+location.host+"/swagger/error.swagger.json","name":"Errors API"}, | ||
| {"url":"http://"+location.host+"/swagger/job.swagger.json","name":"RayJob Service"}, | ||
| {"url":"http://"+location.host+"/swagger/config.swagger.json","name":"ComputeTemplate Service"}, | ||
| {"url":"http://"+location.host+"/swagger/cluster.swagger.json","name":"Cluster Service"}], | ||
| dom_id: '#swagger-ui', | ||
| deepLinking: true, | ||
| presets: [ | ||
| SwaggerUIBundle.presets.apis, | ||
| SwaggerUIStandalonePreset | ||
| ], | ||
| plugins: [ | ||
| SwaggerUIBundle.plugins.DownloadUrl | ||
| ], | ||
| layout: "StandaloneLayout" | ||
| }); | ||
|
|
||
| //</editor-fold> | ||
| }; | ||
| ``` |
Contributor
Author
There was a problem hiding this comment.
I don't think this should be inlined, since the actual file is already hyperlinked. It just means one more thing to update.
metasyn
commented
Nov 14, 2024
Comment on lines
+7
to
+11
| urls: [{"url":window.location.protocol+"//"+location.host+"/swagger/serve.swagger.json","name":"RayServe Service"}, | ||
| {"url":window.location.protocol+"//"+location.host+"/swagger/error.swagger.json","name":"Errors API"}, | ||
| {"url":window.location.protocol+"//"+location.host+"/swagger/job.swagger.json","name":"RayJob Service"}, | ||
| {"url":window.location.protocol+"//"+location.host+"/swagger/config.swagger.json","name":"ComputeTemplate Service"}, | ||
| {"url":window.location.protocol+"//"+location.host+"/swagger/cluster.swagger.json","name":"Cluster Service"}], |
Contributor
Author
There was a problem hiding this comment.
This returns http: or https: depending on which protocol you're using.
Member
|
cc @YQ-Wang would you mind reviewing this PR? Thanks! |
Member
|
gentle ping - @YQ-Wang @han-steve |
Member
|
@metasyn would you mind rebasing the PR with the master branch? |
Contributor
Author
|
I just updated it 👍 |
kevin85421
approved these changes
Dec 11, 2024
Ygnas
pushed a commit
to Ygnas/kuberay
that referenced
this pull request
Mar 20, 2025
* Update swagger-initializer.js * update docs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
If the service is behind an HTTPS endpoint, you cannot load the swagger-ui
Related issue number
Closes #2542
Checks