Files
connexion/docs/quickstart.rst
Julian Berman 5d7eb0bdab Fix two broken links in the docs. (#1854)
(One was enountered manually, the other found via Sphinx's builtin
linkcheck builder, which also confirms there aren't really any others.)

I often suggest using Sphinx's
[`default_role`](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-default_role)
setting to make writing docs quite a bit less noisy in a fairly
uncontroversial way. A toxenv / docs setup in CI also seems like a
decent idea. As is, there is a small part of the docs which isn't being
rendered because it contains errors (in the output below it's the one
`CRITICAL`), and there are some other interlinks which are broken.
Essentially, IMHO, running Sphinx without `-n -T -W` is a recipe for
brokenness unfortunately. This is what one sees when doing so, even
after this PR:

<details>

```

/Users/julian/Development/connexion/docs/request.rst:194: CRITICAL: Unexpected section title.

Form data

/Users/julian/Development/connexion/connexion/lifecycle.py:docstring of connexion.lifecycle.ConnexionRequest.from_starlette_request:1: WARNING: py:class reference target not found: starlette.requests.Request
/Users/julian/Development/connexion/connexion/operations/openapi.py:docstring of connexion.operations.openapi.OpenAPIOperation:1: WARNING: py:class reference target not found: integer
/Users/julian/Development/connexion/connexion/operations/openapi.py:docstring of connexion.operations.openapi.OpenAPIOperation:1: WARNING: py:class reference target not found: AbstractURIParser
/Users/julian/Development/connexion/connexion/operations/openapi.py:docstring of connexion.operations.OpenAPIOperation.function:1: WARNING: py:class reference target not found: types.FunctionType
/Users/julian/Development/connexion/connexion/operations/swagger2.py:docstring of connexion.operations.swagger2.Swagger2Operation:1: WARNING: py:class reference target not found: integer
/Users/julian/Development/connexion/connexion/operations/swagger2.py:docstring of connexion.operations.swagger2.Swagger2Operation:1: WARNING: py:class reference target not found: AbstractURIParser
/Users/julian/Development/connexion/connexion/operations/swagger2.py:docstring of connexion.operations.Swagger2Operation.function:1: WARNING: py:class reference target not found: types.FunctionType
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp.add_error_handler:1: WARNING: py:class reference target not found: connexion.lifecycle.ConnexionResponse
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp.add_error_handler:1: WARNING: py:class reference target not found: connexion.lifecycle.ConnexionResponse
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp.add_error_handler:1: WARNING: py:class reference target not found: connexion.lifecycle.ConnexionResponse
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp.add_error_handler:1: WARNING: py:class reference target not found: connexion.lifecycle.ConnexionResponse
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware.add_error_handler:1: WARNING: py:class reference target not found: connexion.lifecycle.ConnexionResponse
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware.add_error_handler:1: WARNING: py:class reference target not found: connexion.lifecycle.ConnexionResponse
/Users/julian/Development/connexion/connexion/problem.py:docstring of connexion.problem.problem:14: WARNING: py:class reference target not found: type: str
/Users/julian/Development/connexion/connexion/problem.py:docstring of connexion.problem.problem:1: WARNING: py:class reference target not found: ConnexionResponse
/Users/julian/Development/connexion/connexion/exceptions.py:docstring of connexion.exceptions:1: WARNING: py:class reference target not found: jsonschema.exceptions.ValidationError
/Users/julian/Development/connexion/connexion/exceptions.py:docstring of connexion.exceptions:1: WARNING: py:class reference target not found: starlette.exceptions.HTTPException
/Users/julian/Development/connexion/connexion/exceptions.py:docstring of connexion.exceptions:1: WARNING: py:class reference target not found: starlette.exceptions.HTTPException
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp.add_wsgi_middleware:1: WARNING: py:class reference target not found: types.TracebackType
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.MiddlewarePosition:1: WARNING: py:class reference target not found: ExceptionMiddleware
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.MiddlewarePosition:1: WARNING: py:class reference target not found: SwaggerUIMiddleware
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.MiddlewarePosition:1: WARNING: py:class reference target not found: RoutingMiddleware
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.MiddlewarePosition:1: WARNING: py:class reference target not found: SecurityMiddleware
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.MiddlewarePosition:1: WARNING: py:class reference target not found: RequestValidationMiddleware
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.MiddlewarePosition:1: WARNING: py:class reference target not found: ContextMiddleware
/Users/julian/Development/connexion/docs/middleware.rst:121: WARNING: py:class reference target not found: SecurityMiddleware
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:1: WARNING: py:class reference target not found: pathlib.Path
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:1: WARNING: py:class reference target not found: connexion.jsonifier.Jsonifier
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:1: WARNING: py:class reference target not found: connexion.uri_parsing.AbstractURIParser
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:3: WARNING: py:obj reference target not found: middleware.main.ConnexionMiddleware.default_middlewares
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:21: WARNING: py:class reference target not found: options.ConnexionOptions
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:23: WARNING: py:mod reference target not found: uri_parsing
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:26: WARNING: py:obj reference target not found: validators.VALIDATOR_MAP
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:28: WARNING: py:obj reference target not found: security.SECURITY_HANDLERS
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:1: WARNING: py:class reference target not found: pathlib.Path
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:1: WARNING: py:class reference target not found: connexion.jsonifier.Jsonifier
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:1: WARNING: py:class reference target not found: connexion.uri_parsing.AbstractURIParser
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:2: WARNING: py:obj reference target not found: middleware.main.ConnexionMiddleware.default_middlewares
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:12: WARNING: py:class reference target not found: options.ConnexionOptions
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:23: WARNING: py:class reference target not found: options.ConnexionOptions
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:25: WARNING: py:mod reference target not found: uri_parsing
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:28: WARNING: py:obj reference target not found: validators.VALIDATOR_MAP
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:30: WARNING: py:obj reference target not found: security.SECURITY_HANDLERS
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:1: WARNING: py:class reference target not found: pathlib.Path
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:1: WARNING: py:class reference target not found: connexion.jsonifier.Jsonifier
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:1: WARNING: py:class reference target not found: connexion.uri_parsing.AbstractURIParser
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:1: WARNING: py:obj reference target not found: middleware.main.ConnexionmMiddleware.default_middlewares
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:19: WARNING: py:class reference target not found: options.ConnexionOptions
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:21: WARNING: py:mod reference target not found: uri_parsing
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:24: WARNING: py:obj reference target not found: validators.VALIDATOR_MAP
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:26: WARNING: py:obj reference target not found: security.SECURITY_HANDLERS
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:1: WARNING: py:class reference target not found: pathlib.Path
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:1: WARNING: py:class reference target not found: connexion.jsonifier.Jsonifier
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:1: WARNING: py:class reference target not found: connexion.uri_parsing.AbstractURIParser
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:3: WARNING: py:obj reference target not found: middleware.main.ConnexionMiddleware.default_middlewares
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:21: WARNING: py:class reference target not found: options.ConnexionOptions
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:23: WARNING: py:mod reference target not found: uri_parsing
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:26: WARNING: py:obj reference target not found: validators.VALIDATOR_MAP
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:28: WARNING: py:obj reference target not found: security.SECURITY_HANDLERS
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:1: WARNING: py:class reference target not found: pathlib.Path
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:1: WARNING: py:class reference target not found: connexion.jsonifier.Jsonifier
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:1: WARNING: py:class reference target not found: connexion.uri_parsing.AbstractURIParser
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:2: WARNING: py:obj reference target not found: middleware.main.ConnexionMiddleware.default_middlewares
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:12: WARNING: py:class reference target not found: options.ConnexionOptions
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:23: WARNING: py:class reference target not found: options.ConnexionOptions
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:25: WARNING: py:mod reference target not found: uri_parsing
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:28: WARNING: py:obj reference target not found: validators.VALIDATOR_MAP
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:30: WARNING: py:obj reference target not found: security.SECURITY_HANDLERS
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:1: WARNING: py:class reference target not found: pathlib.Path
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:1: WARNING: py:class reference target not found: connexion.jsonifier.Jsonifier
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:1: WARNING: py:class reference target not found: connexion.uri_parsing.AbstractURIParser
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:1: WARNING: py:obj reference target not found: middleware.main.ConnexionmMiddleware.default_middlewares
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:19: WARNING: py:class reference target not found: options.ConnexionOptions
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:21: WARNING: py:mod reference target not found: uri_parsing
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:24: WARNING: py:obj reference target not found: validators.VALIDATOR_MAP
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:26: WARNING: py:obj reference target not found: security.SECURITY_HANDLERS
/Users/julian/Development/connexion/connexion/apps/abstract.py:docstring of connexion.apps.abstract.AbstractApp.add_api:1: WARNING: py:class reference target not found: pathlib.Path
/Users/julian/Development/connexion/connexion/apps/abstract.py:docstring of connexion.apps.abstract.AbstractApp.add_api:1: WARNING: py:class reference target not found: connexion.jsonifier.Jsonifier
/Users/julian/Development/connexion/connexion/apps/abstract.py:docstring of connexion.apps.abstract.AbstractApp.add_api:1: WARNING: py:class reference target not found: connexion.uri_parsing.AbstractURIParser
/Users/julian/Development/connexion/connexion/apps/abstract.py:docstring of connexion.apps.abstract.AbstractApp.add_api:11: WARNING: py:class reference target not found: resolver.Resolver
/Users/julian/Development/connexion/connexion/apps/abstract.py:docstring of connexion.apps.abstract.AbstractApp.add_api:18: WARNING: py:class reference target not found: options.ConnexionOptions
/Users/julian/Development/connexion/connexion/apps/abstract.py:docstring of connexion.apps.abstract.AbstractApp.add_api:20: WARNING: py:mod reference target not found: uri_parsing
/Users/julian/Development/connexion/connexion/apps/abstract.py:docstring of connexion.apps.abstract.AbstractApp.add_api:23: WARNING: py:obj reference target not found: validators.VALIDATOR_MAP
/Users/julian/Development/connexion/connexion/apps/abstract.py:docstring of connexion.apps.abstract.AbstractApp.add_api:25: WARNING: py:obj reference target not found: security.SECURITY_HANDLERS
/Users/julian/Development/connexion/connexion/apps/abstract.py:docstring of connexion.apps.abstract.AbstractApp.add_api:1: WARNING: py:class reference target not found: pathlib.Path
/Users/julian/Development/connexion/connexion/apps/abstract.py:docstring of connexion.apps.abstract.AbstractApp.add_api:1: WARNING: py:class reference target not found: connexion.jsonifier.Jsonifier
/Users/julian/Development/connexion/connexion/apps/abstract.py:docstring of connexion.apps.abstract.AbstractApp.add_api:1: WARNING: py:class reference target not found: connexion.uri_parsing.AbstractURIParser
/Users/julian/Development/connexion/connexion/apps/abstract.py:docstring of connexion.apps.abstract.AbstractApp.add_api:11: WARNING: py:class reference target not found: resolver.Resolver
/Users/julian/Development/connexion/connexion/apps/abstract.py:docstring of connexion.apps.abstract.AbstractApp.add_api:18: WARNING: py:class reference target not found: options.ConnexionOptions
/Users/julian/Development/connexion/connexion/apps/abstract.py:docstring of connexion.apps.abstract.AbstractApp.add_api:20: WARNING: py:mod reference target not found: uri_parsing
/Users/julian/Development/connexion/connexion/apps/abstract.py:docstring of connexion.apps.abstract.AbstractApp.add_api:23: WARNING: py:obj reference target not found: validators.VALIDATOR_MAP
/Users/julian/Development/connexion/connexion/apps/abstract.py:docstring of connexion.apps.abstract.AbstractApp.add_api:25: WARNING: py:obj reference target not found: security.SECURITY_HANDLERS
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware.add_api:1: WARNING: py:class reference target not found: pathlib.Path
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware.add_api:1: WARNING: py:class reference target not found: connexion.jsonifier.Jsonifier
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware.add_api:1: WARNING: py:class reference target not found: connexion.uri_parsing.AbstractURIParser
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware.add_api:11: WARNING: py:class reference target not found: resolver.Resolver
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware.add_api:18: WARNING: py:class reference target not found: options.ConnexionOptions
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware.add_api:20: WARNING: py:mod reference target not found: uri_parsing
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware.add_api:23: WARNING: py:obj reference target not found: validators.VALIDATOR_MAP
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware.add_api:25: WARNING: py:obj reference target not found: security.SECURITY_HANDLERS
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:1: WARNING: py:class reference target not found: pathlib.Path
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:1: WARNING: py:class reference target not found: connexion.jsonifier.Jsonifier
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:1: WARNING: py:class reference target not found: connexion.uri_parsing.AbstractURIParser
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:4: WARNING: py:obj reference target not found: middleware.main.ConnexionMiddleware.default_middlewares
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:22: WARNING: py:class reference target not found: options.ConnexionOptions
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:24: WARNING: py:mod reference target not found: uri_parsing
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:27: WARNING: py:obj reference target not found: validators.VALIDATOR_MAP
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:29: WARNING: py:obj reference target not found: security.SECURITY_HANDLERS
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.abstract.AbstractApp.add_api:1: WARNING: py:class reference target not found: pathlib.Path
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.abstract.AbstractApp.add_api:1: WARNING: py:class reference target not found: connexion.jsonifier.Jsonifier
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.abstract.AbstractApp.add_api:1: WARNING: py:class reference target not found: connexion.uri_parsing.AbstractURIParser
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:18: WARNING: py:class reference target not found: options.ConnexionOptions
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:20: WARNING: py:mod reference target not found: uri_parsing
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:23: WARNING: py:obj reference target not found: validators.VALIDATOR_MAP
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp:25: WARNING: py:obj reference target not found: security.SECURITY_HANDLERS
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp.add_error_handler:1: WARNING: py:class reference target not found: connexion.lifecycle.ConnexionResponse
/Users/julian/Development/connexion/connexion/apps/asynchronous.py:docstring of connexion.apps.asynchronous.AsyncApp.add_error_handler:1: WARNING: py:class reference target not found: connexion.lifecycle.ConnexionResponse
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:1: WARNING: py:class reference target not found: pathlib.Path
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:1: WARNING: py:class reference target not found: connexion.jsonifier.Jsonifier
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:1: WARNING: py:class reference target not found: connexion.uri_parsing.AbstractURIParser
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:3: WARNING: py:obj reference target not found: middleware.main.ConnexionMiddleware.default_middlewares
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:13: WARNING: py:class reference target not found: options.ConnexionOptions
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:24: WARNING: py:class reference target not found: options.ConnexionOptions
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:26: WARNING: py:mod reference target not found: uri_parsing
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:29: WARNING: py:obj reference target not found: validators.VALIDATOR_MAP
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:31: WARNING: py:obj reference target not found: security.SECURITY_HANDLERS
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.abstract.AbstractApp.add_api:1: WARNING: py:class reference target not found: pathlib.Path
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.abstract.AbstractApp.add_api:1: WARNING: py:class reference target not found: connexion.jsonifier.Jsonifier
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.abstract.AbstractApp.add_api:1: WARNING: py:class reference target not found: connexion.uri_parsing.AbstractURIParser
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:18: WARNING: py:class reference target not found: options.ConnexionOptions
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:20: WARNING: py:mod reference target not found: uri_parsing
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:23: WARNING: py:obj reference target not found: validators.VALIDATOR_MAP
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp:25: WARNING: py:obj reference target not found: security.SECURITY_HANDLERS
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp.add_error_handler:1: WARNING: py:class reference target not found: connexion.lifecycle.ConnexionResponse
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp.add_error_handler:1: WARNING: py:class reference target not found: connexion.lifecycle.ConnexionResponse
/Users/julian/Development/connexion/connexion/apps/flask.py:docstring of connexion.apps.flask.FlaskApp.add_wsgi_middleware:1: WARNING: py:class reference target not found: types.TracebackType
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:1: WARNING: py:class reference target not found: pathlib.Path
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:1: WARNING: py:class reference target not found: connexion.jsonifier.Jsonifier
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:1: WARNING: py:class reference target not found: connexion.uri_parsing.AbstractURIParser
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:2: WARNING: py:obj reference target not found: middleware.main.ConnexionmMiddleware.default_middlewares
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:20: WARNING: py:class reference target not found: options.ConnexionOptions
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:22: WARNING: py:mod reference target not found: uri_parsing
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:25: WARNING: py:obj reference target not found: validators.VALIDATOR_MAP
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:27: WARNING: py:obj reference target not found: security.SECURITY_HANDLERS
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware.add_api:1: WARNING: py:class reference target not found: pathlib.Path
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware.add_api:1: WARNING: py:class reference target not found: connexion.jsonifier.Jsonifier
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware.add_api:1: WARNING: py:class reference target not found: connexion.uri_parsing.AbstractURIParser
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:18: WARNING: py:class reference target not found: options.ConnexionOptions
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:20: WARNING: py:mod reference target not found: uri_parsing
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:23: WARNING: py:obj reference target not found: validators.VALIDATOR_MAP
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware:25: WARNING: py:obj reference target not found: security.SECURITY_HANDLERS
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware.add_error_handler:1: WARNING: py:class reference target not found: connexion.lifecycle.ConnexionResponse
/Users/julian/Development/connexion/connexion/middleware/main.py:docstring of connexion.middleware.main.ConnexionMiddleware.add_error_handler:1: WARNING: py:class reference target not found: connexion.lifecycle.ConnexionResponse
/Users/julian/Development/connexion/connexion/lifecycle.py:docstring of connexion.lifecycle.ConnexionRequest.from_starlette_request:1: WARNING: py:class reference target not found: starlette.requests.Request
/Users/julian/Development/connexion/connexion/resolver.py:docstring of connexion.resolver.RelativeResolver:1: WARNING: py:class reference target not found: types.ModuleType
/Users/julian/Development/connexion/connexion/resolver.py:docstring of connexion.resolver.RelativeResolver:1: WARNING: py:class reference target not found: types.FunctionType
/Users/julian/Development/connexion/docs/testing.rst:29: WARNING: py:class reference target not found: TestContext
/Users/julian/Development/connexion/connexion/problem.py:docstring of connexion.problem.problem:14: WARNING: py:class reference target not found: type: str
/Users/julian/Development/connexion/connexion/problem.py:docstring of connexion.problem.problem:1: WARNING: py:class reference target not found: ConnexionResponse
/Users/julian/Development/connexion/docs/exceptions.rst:1: WARNING: broken link: about:blank ()
/Users/julian/Development/connexion/docs/context.rst:1: WARNING: broken link: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#componentsObject (Anchor 'componentsObject' not found)
/Users/julian/Development/connexion/docs/v3.rst:105: WARNING: broken link: https://github.com/abersheeran/a2wsgi#convert-asgi-app-to-wsgi-app (Anchor 'convert-asgi-app-to-wsgi-app' not found)
/Users/julian/Development/connexion/docs/context.rst:1: WARNING: broken link: https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#security-definitions-object (Anchor 'security-definitions-object' not found)
/Users/julian/Development/connexion/docs/context.rst:1: WARNING: broken link: https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#definitionsObject (Anchor 'definitionsObject' not found)
docs: exit 1 (5.40 seconds) /Users/julian/Development/connexion> .tox/docs/bin/python -m sphinx -n -T -q -b linkcheck docs /Users/julian/Development/connexion/.tox/docs/tmp/build pid=35935
.pkg: _exit> python /Users/julian/.dotfiles/.local/share/virtualenvs/tox/lib/python3.12/site-packages/pyproject_api/_backend.py True poetry.core.masonry.api
  docs: FAIL code 1 (7.91=setup[1.96]+cmd[0.55,5.40] seconds)
  evaluation failed :( (7.95 seconds)

```

</details>

I'm trying to actually use connexion for the first time, but if the
above sounds reasonable to y'all maintainers I can try to come back to
it and send a PR later.
2024-02-11 22:46:22 +01:00

303 lines
8.8 KiB
ReStructuredText

Quickstart
==========
Installation
------------
You can install connexion using pip:
.. code-block:: bash
$ pip install connexion
Connexion provides 'extras' with optional dependencies to unlock additional features:
- :code:`flask`: Enables the :code:`FlaskApp` to build applications compatible with the Flask
ecosystem.
- :code:`swagger-ui`: Enables a Swagger UI console for your application.
- :code:`uvicorn`: Enables to run the your application using :code:`app.run()` for
development instead of using an external ASGI server.
You can install them as follows:
.. code-block:: bash
$ pip install connexion[<extra>]
$ pip install connexion[<extra1>,<extra2>].
Creating your application
-------------------------
Connexion can be used either as a standalone application or as a middleware wrapping an existing
ASGI (or WSGI) application written using a different framework. The standalone application can be
built using either the :code:`AsyncApp` or :code:`FlaskApp`.
- The :code:`AsyncApp` is a lightweight application with native asynchronous support. Use it if you
are starting a new project and have no specific reason to use one of the other options.
- The :code:`FlaskApp` leverages the `Flask` framework, which is useful if you're migrating from
connexion 2.X or you want to leverage the `Flask` ecosystem.
- The :code:`ConnexionMiddleware` can be wrapped around any existing ASGI or WSGI application.
Use it if you already have an application written in a different framework and want to add
functionality provided by connexion
.. tab-set::
.. tab-item:: AsyncApp
:sync: AsyncApp
.. code-block:: python
:caption: **app.py**
from connexion import AsyncApp
app = AsyncApp(__name__)
.. dropdown:: View a detailed reference of the options accepted by the :code:`AsyncApp`
:icon: eye
.. autoclass:: connexion.AsyncApp
:noindex:
.. tab-item:: FlaskApp
:sync: FlaskApp
.. note::
To leverage the :code:`FlaskApp`, make sure you install connexion using the
:code:`flask` extra.
.. code-block:: python
:caption: **app.py**
from connexion import FlaskApp
app = FlaskApp(__name__)
.. dropdown:: View a detailed reference of the options accepted by the :code:`FlaskApp`
:icon: eye
.. autoclass:: connexion.FlaskApp
:noindex:
.. tab-item:: ConnexionMiddleware
:sync: ConnexionMiddleware
.. code-block:: python
:caption: **app.py**
from asgi_framework import App
from connexion import ConnexionMiddleware
app = App(__name__)
app = ConnexionMiddleware(app)
You can also wrap a WSGI application leveraging the :code:`a2wsgi.WSGIMiddleware`:
.. code-block:: python
:caption: **app.py**
from wsgi_framework import App
from connexion import ConnexionMiddleware
from a2wsgi import WSGIMiddleware
wsgi_app = App(__name__)
asgi_app = WSGIMiddleware(wsgi_app)
app = ConnexionMiddleware(asgi_app)
.. dropdown:: View a detailed reference of the options accepted by the
:code:`ConnexionMiddleware`
:icon: eye
.. autoclass:: connexion.ConnexionMiddleware
:noindex:
Registering an API
------------------
While you can register individual routes on your application, connexion really shines when you
register an API defined by an OpenAPI (or Swagger) specification.
.. grid::
:padding: 0
.. grid-item:: **run.py**
.. code-block:: python
def post_greeting(name: str):
return f"Hello {name}", 200
app.add_api("openapi.yaml")
.. grid-item:: **openapi.yaml**
.. code-block:: yaml
openapi: "3.0.0"
...
paths:
/greeting/{name}:
post:
operationId: run.post_greeting
responses:
200:
content:
text/plain:
schema:
type: string
parameters:
- name: name
in: path
required: true
schema:
type: string
The operation described in your specification is automatically linked to your Python view function
via the :code:`operationId`. You can change this behavior using different :code:`Resolvers`, see
:doc:`routing`. When the endpoint is called, connexion will take care of routing, security,
request body and parameter parsing, and response serialization. All based on the specification.
You can add as many APIs as you want to a single application. The :code:`add_api()` method
provides a lot of configuration options. When an option is provided both to the App and the API,
the API value will take precedence.
.. dropdown:: View a detailed reference of the options accepted by the :code:`add_api()` method
:icon: eye
.. tab-set::
.. tab-item:: AsyncApp
:sync: AsyncApp
.. autofunction:: connexion.AsyncApp.add_api
:noindex:
.. tab-item:: FlaskApp
:sync: FlaskApp
.. autofunction:: connexion.FlaskApp.add_api
:noindex:
.. tab-item:: ConnexionMiddleware
:sync: ConnexionMiddleware
.. autofunction:: connexion.ConnexionMiddleware.add_api
:noindex:
Running your application
------------------------
You can run your application using an ASGI server such as `uvicorn`. If you defined your
:code:`app` in a python module called :code:`run.py`, you can run it as follows:
.. code-block:: bash
# assuming your application is defined as ``app`` in ``run.py``
$ uvicorn run:app
Or with gunicorn (which is recommended in production).
.. code-block:: bash
# assuming your application is defined as ``app`` in ``run.py``
$ gunicorn -k uvicorn.workers.UvicornWorker run:app
See the `uvicorn documentation`_ for more details or check this
`overview of available ASGI servers`_ for other options.
.. _overview of available ASGI servers: https://asgi.readthedocs.io/en/latest/implementations.html#servers
If you installed connexion using :code:`connexion[uvicorn]`, you can run it using the
:code:`run` method. This is only recommended for development:
.. code-block:: python
app.run()
To leverage automatic reloading of your application, you need to provide the application as an
import string. In most cases, this can be achieved as follows:
.. code-block:: python
from pathlib import Path
app.run(f"{Path(__file__).stem}:app")
.. dropdown:: View a detailed reference of the options accepted by the :code:`run()` method
:icon: eye
.. tab-set::
.. tab-item:: AsyncApp
:sync: AsyncApp
.. autofunction:: connexion.AsyncApp.run
:noindex:
.. tab-item:: FlaskApp
:sync: FlaskApp
.. autofunction:: connexion.FlaskApp.run
:noindex:
.. tab-item:: ConnexionMiddleware
:sync: ConnexionMiddleware
.. autofunction:: connexion.ConnexionMiddleware.run
:noindex:
.. _uvicorn documentation: https://www.uvicorn.org/deployment/
The Swagger UI
--------------
If you installed connexion using the :code:`swagger-ui` extra, a Swagger UI is available for each
API, providing interactive documentation. By default the UI is hosted at :code:`{base_path}/ui/`
where :code:`base_path`` is the base path of the API.
**https://{host}/{base_path}/ui/**
.. image:: images/swagger_ui.png
Check :doc:`swagger_ui` for information on how to configure the UI.
Full App class reference
------------------------
For more details on what you can do, view the complete API reference below.
.. tab-set::
.. tab-item:: AsyncApp
:sync: AsyncApp
.. dropdown:: View a detailed reference of the :code:`AsyncApp`
:icon: eye
.. autoclass:: connexion.AsyncApp
:members:
:undoc-members:
:inherited-members:
.. tab-item:: FlaskApp
:sync: FlaskApp
.. dropdown:: View a detailed reference of the :code:`FlaskApp`
:icon: eye
.. autoclass:: connexion.FlaskApp
:members:
:undoc-members:
:inherited-members:
.. tab-item:: ConnexionMiddleware
:sync: ConnexionMiddleware
.. dropdown:: View a detailed reference of the :code:`ConnexionMiddleware`
:icon: eye
.. autoclass:: connexion.ConnexionMiddleware
:members:
:undoc-members: