mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-12-27 06:58:35 +00:00
bug: fix the docs rest api reference url (#3775)
* bug: fix the docs rest api reference url * revert openapi json changes * remove last line on json files * Add explanation about `servers` and remove `servers` parameter from FastAPI * generate openapi schema without empty end line
This commit is contained in:
parent
890e2bf0f5
commit
86ade4817e
@ -4,6 +4,11 @@
|
||||
"title": "Haystack REST API",
|
||||
"version": "1.13.0rc0"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "http://localhost:8000"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/initialized": {
|
||||
"get": {
|
||||
|
||||
@ -4,6 +4,11 @@
|
||||
"title": "Haystack REST API",
|
||||
"version": "1.13.0rc0"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "http://localhost:8000"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/initialized": {
|
||||
"get": {
|
||||
|
||||
@ -64,8 +64,11 @@ def get_openapi_specs() -> dict:
|
||||
"""
|
||||
Used to autogenerate OpenAPI specs file to use in the documentation.
|
||||
|
||||
See `docs/_src/api/openapi/generate_openapi_specs.py`
|
||||
Returns `servers` to specify base URL for OpenAPI Playground (see https://swagger.io/docs/specification/api-host-and-base-path/)
|
||||
|
||||
See `.github/utils/generate_openapi_specs.py`
|
||||
"""
|
||||
|
||||
app = get_app()
|
||||
return get_openapi(
|
||||
title=app.title,
|
||||
@ -73,4 +76,5 @@ def get_openapi_specs() -> dict:
|
||||
openapi_version=app.openapi_version,
|
||||
description=app.description,
|
||||
routes=app.routes,
|
||||
servers=[{"url": "http://localhost:8000"}],
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user