Skip to content

Swagger UI doesn't work with split specs (connexion 3.3.0) #2102

@gassho

Description

@gassho

The problem appears when splitting specs in many openapi.yml files, and adding them with many app.add_api.
All paths are well working.
But when accessing to swagger UI page, no error appears, but it only displays information of last added openapi.yml.

Environment:
Connexion: 3.3.0
Python: 3.10.12

Note:
To make split working, I had to add a unique name for each spec: app.add_api(...., name={unique_name})
Documentation and examples don't explain this.

UPDATE 2025/12/15
Example:
In following file, an API is splitted in Healthchech API and Test API, both with only one distinct path.
test_connexion.py
By executing uvicorn test_connexion:app --host 0.0.0.0 and going on http://127.0.0.1:8000/ui , only information of Healthchech API is displayed, since Healthchech API is the last added API.

As commented, the file includes a version where Test API is added last. If uncommented (and other part commented), then http://127.0.0.1:8000/ui displays only information of Test API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions