Skip to content

Commit

Permalink
Fix swagger UI for split specs
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbeSneyders committed Nov 23, 2024
1 parent cef665c commit 86e2c04
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion connexion/middleware/swagger_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def _base_path_for_prefix(self, request: StarletteRequest) -> str:
"route_root_path", request.scope.get("root_path", "")
).rstrip("/")

def _spec_for_prefix(self, request):
def _spec_for_prefix(self, request) -> dict:
"""
returns a spec with a modified basePath / servers block
which corresponds to the incoming request path.
Expand Down
2 changes: 1 addition & 1 deletion connexion/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def enforce_string_keys(obj):
return OpenAPISpecification(spec, base_uri=base_uri)

def clone(self):
return type(self)(copy.deepcopy(self._raw_spec))
return type(self)(copy.deepcopy(self._spec))

@classmethod
def load(cls, spec, *, arguments=None):
Expand Down

0 comments on commit 86e2c04

Please sign in to comment.