feat: Add API docs
Update the nginx configuration file to access API docs Change-Id: I59dc9aee11f87f61d1ecb6095b16bed9658a58c0
This commit is contained in:
parent
1393aea120
commit
ea69660e4d
@ -176,6 +176,11 @@ Skyline 像九色鹿一样,轻巧、优雅,而又能力强大,为 OpenStac
|
||||
|
||||
docker run -d --name skyline --restart=always -v /etc/skyline/skyline.yaml:/etc/skyline/skyline.yaml --net=host 99cloud/skyline:latest
|
||||
|
||||
API Doc
|
||||
~~~~~~~~~
|
||||
|
||||
你可以使用 ``https://<ip_address>:9999/api/openstack/skyline/docs`` 来访问 API doc
|
||||
|
||||
访问测试
|
||||
~~~~~~~~
|
||||
|
||||
|
@ -112,6 +112,11 @@ Deployment with MariaDB
|
||||
|
||||
https://docs.openstack.org/skyline-apiserver/latest/install/docker-install-ubuntu.html
|
||||
|
||||
API Doc
|
||||
~~~~~~~~~
|
||||
|
||||
You can visit the API doc ``https://<ip_address>:9999/api/openstack/skyline/docs``
|
||||
|
||||
Test Access
|
||||
~~~~~~~~~~~
|
||||
|
||||
|
@ -180,3 +180,8 @@ Finalize installation
|
||||
|
||||
If you need to modify skyline port, add ``-e LISTEN_ADDRESS=<ip:port>`` in run command.
|
||||
Default port is 9999.
|
||||
|
||||
API Doc
|
||||
---------
|
||||
|
||||
You can visit the API doc ``https://<ip_address>:9999/api/openstack/skyline/docs``
|
||||
|
6
releasenotes/notes/add-api-doc-5aaffa4e93ca469a.yaml
Normal file
6
releasenotes/notes/add-api-doc-5aaffa4e93ca469a.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Added ``api_prefix`` forwarding to the nginx configuration file.
|
||||
Now You can visit the API doc
|
||||
``https://<ip_address>:9999/api/openstack/skyline/docs``.
|
@ -31,6 +31,7 @@ from skyline_console import static_path
|
||||
import skyline_apiserver
|
||||
from skyline_apiserver.config import CONF, configure
|
||||
from skyline_apiserver.log import LOG, setup
|
||||
from skyline_apiserver.types import constants
|
||||
|
||||
|
||||
class CommandException(Exception):
|
||||
@ -166,6 +167,7 @@ def main(
|
||||
context = {
|
||||
"skyline_console_static_path": static_path,
|
||||
"endpoints": [i.dict() for i in endpoints.values()],
|
||||
"api_prefix": constants.API_PREFIX,
|
||||
}
|
||||
if ssl_certfile:
|
||||
context.update(ssl_certfile=ssl_certfile)
|
||||
|
@ -98,6 +98,16 @@ http {
|
||||
proxy_set_header Host $http_host;
|
||||
}
|
||||
|
||||
location {{ api_prefix }}/ {
|
||||
proxy_pass http://skyline{{ api_prefix }}/;
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header Host $http_host;
|
||||
}
|
||||
|
||||
{% for endpoint in endpoints %}
|
||||
{{ endpoint["part"] }}
|
||||
location {{ endpoint["location"] }} {
|
||||
|
Loading…
Reference in New Issue
Block a user