Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
julienschuermans authored Nov 28, 2024
2 parents af4e0ea + 58c8bb6 commit 63e0864
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 13 deletions.
4 changes: 2 additions & 2 deletions connexion/apps/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def __init__(
start.
:param strict_validation: When True, extra form or query parameters not defined in the
specification result in a validation error. Defaults to False.
:param swagger_ui_options: Instance of :class:`options.ConnexionOptions` with
:param swagger_ui_options: Instance of :class:`options.SwaggerUIOptions` with
configuration options for the swagger ui.
:param uri_parser_class: Class to use for uri parsing. See :mod:`uri_parsing`.
:param validate_responses: Whether to validate responses against the specification. This has
Expand Down Expand Up @@ -162,7 +162,7 @@ def add_api(
start.
:param strict_validation: When True, extra form or query parameters not defined in the
specification result in a validation error. Defaults to False.
:param swagger_ui_options: A :class:`options.ConnexionOptions` instance with configuration
:param swagger_ui_options: A :class:`options.SwaggerUIOptions` instance with configuration
options for the swagger ui.
:param uri_parser_class: Class to use for uri parsing. See :mod:`uri_parsing`.
:param validate_responses: Whether to validate responses against the specification. This has
Expand Down
2 changes: 1 addition & 1 deletion connexion/apps/asynchronous.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def __init__(
start.
:param strict_validation: When True, extra form or query parameters not defined in the
specification result in a validation error. Defaults to False.
:param swagger_ui_options: Instance of :class:`options.ConnexionOptions` with
:param swagger_ui_options: Instance of :class:`options.SwaggerUIOptions` with
configuration options for the swagger ui.
:param uri_parser_class: Class to use for uri parsing. See :mod:`uri_parsing`.
:param validate_responses: Whether to validate responses against the specification. This has
Expand Down
6 changes: 2 additions & 4 deletions connexion/apps/flask.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,9 @@ def __init__(
should either be absolute or relative to the root path of the application. Defaults to
the root path.
:param arguments: Arguments to substitute the specification using Jinja.
:param auth_all_paths: whether to authenticate not paths not defined in the specification.
:param auth_all_paths: whether to authenticate all paths not defined in the specification.
Defaults to False.
:param jsonifier: Custom jsonifier to overwrite json encoding for json responses.
:param swagger_ui_options: A :class:`options.ConnexionOptions` instance with configuration
options for the swagger ui.
:param pythonic_params: When True, CamelCase parameters are converted to snake_case and an
underscore is appended to any shadowed built-ins. Defaults to False.
:param resolver: Callable that maps operationId to a function or instance of
Expand All @@ -216,7 +214,7 @@ def __init__(
start.
:param strict_validation: When True, extra form or query parameters not defined in the
specification result in a validation error. Defaults to False.
:param swagger_ui_options: Instance of :class:`options.ConnexionOptions` with
:param swagger_ui_options: Instance of :class:`options.SwaggerUIOptions` with
configuration options for the swagger ui.
:param uri_parser_class: Class to use for uri parsing. See :mod:`uri_parsing`.
:param validate_responses: Whether to validate responses against the specification. This has
Expand Down
4 changes: 2 additions & 2 deletions connexion/middleware/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def __init__(
start.
:param strict_validation: When True, extra form or query parameters not defined in the
specification result in a validation error. Defaults to False.
:param swagger_ui_options: Instance of :class:`options.ConnexionOptions` with
:param swagger_ui_options: Instance of :class:`options.SwaggerUIOptions` with
configuration options for the swagger ui.
:param uri_parser_class: Class to use for uri parsing. See :mod:`uri_parsing`.
:param validate_responses: Whether to validate responses against the specification. This has
Expand Down Expand Up @@ -391,7 +391,7 @@ def add_api(
:param strict_validation: When True, extra form or query parameters not defined in the
specification result in a validation error. Defaults to False.
:param swagger_ui_options: A dict with configuration options for the swagger ui. See
:class:`options.ConnexionOptions`.
:class:`options.SwaggerUIOptions`.
:param uri_parser_class: Class to use for uri parsing. See :mod:`uri_parsing`.
:param validate_responses: Whether to validate responses against the specification. This has
an impact on performance. Defaults to False.
Expand Down
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
4 changes: 2 additions & 2 deletions docs/v3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ Instead, you need to run the Connexion application using an ASGI server:
.. code-block:: bash
$ uvicorn run:app
$ uvicorn hello:app
.. code-block:: bash
$ gunicorn -k uvicorn.workers.UvicornWorker run:app
$ gunicorn -k uvicorn.workers.UvicornWorker hello:app
.. warning::

Expand Down

0 comments on commit 63e0864

Please sign in to comment.