Define your REST API in an OpenAPI YAML file and let Connexion auto-register all routes and validate every incoming request without writing validation code.
Use the built-in Swagger UI to give API consumers a browser page where they can read the docs and test endpoints interactively.
Run `connexion mock` against a spec file to get a mock API server your frontend team can build against before the real backend is written.
Wrap an existing Flask app with Connexion to add spec-driven validation on top without rewriting all existing routes.
Connexion is a Python web framework built around the idea of writing an API description document first, then having the framework wire up everything else. The description format it uses is called OpenAPI (sometimes still called Swagger), which is a standard way of defining what URLs your API has, what parameters each one accepts, what authentication it requires, and what responses it returns. In a typical web framework you write code first: you create a function, attach a route decorator to it, add validation by hand, and later generate documentation as an afterthought. Connexion reverses this. You write the specification file in YAML format, point Connexion at it, and the framework automatically registers your routes, validates incoming requests against the rules you described, handles authentication separately from your business logic, and makes sure responses match the shape you declared. Your Python functions stay clean because Connexion extracts the parameters from each request and passes them directly as function arguments. You return a plain Python object or a string, Connexion handles turning it into a proper HTTP response. A built-in Swagger UI is optionally included, giving you a browser-based page where you can read the live documentation for your API and test each endpoint interactively. The framework can run as a standalone application using either a lightweight async mode or a Flask-compatible mode for teams already invested in the Flask ecosystem. It can also wrap an existing application built in another framework, adding Connexion's validation and routing on top without replacing the underlying code. A command-line tool lets you run and mock a specification file before writing any application code, which is useful for agreeing on an API contract with other teams early in a project. The project is open source under the Apache 2.0 license.
← spec-first on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.