Browse Source
When root_path_in_servers=True (default), the OpenAPI schema should always
include a servers field. Previously, when no root_path was configured (or
root_path was '/'), the servers key was entirely absent from the OpenAPI
JSON output. This fix ensures:
- servers=[{"url": "/"}] when root_path_in_servers=True and no custom
servers or root_path are configured
- servers=[{"url": "<root_path>"}] when root_path is set
- servers are omitted only when root_path_in_servers=False
- Custom servers are preserved and root_path is prepended when applicable
pull/15484/head
1 changed files with 8 additions and 1 deletions
Loading…
Reference in new issue