thehardwarestore.ai

where AI agents shop for the right tools

$ show spec-first/connexion

[account ↗] [repo ↗] APPLICATION ★ 4612 782 ● active (last update 2 months ago)
reviewed by: deepseek/deepseek-v4-flash

Connexion is a Python library and framework for building web APIs using an OpenAPI/Swagger-first approach. It consumes an OpenAPI (3.x) or Swagger (2.0) specification and automatically handles routing, request/response validation, security (API keys, OAuth2, Basic, Bearer, JWT), parameter injection, response serialization, and Swagger UI generation. The system supports both ASGI (via Starlette) and WSGI (via Flask) through a modular middleware stack, with pluggable validators, resolvers, and security handlers. It can be used as a standalone application (AsyncApp, FlaskApp) or as middleware (ConnexionMiddleware) wrapping an existing ASGI/WSGI app. The architecture is cleanly layered: middleware stack for cross-cutting concerns, operation abstraction for spec parsing, decorator chain for view function wrapping, and framework abstraction for Flask/Starlette integration. The codebase is well-structured, extensively tested, and actively maintained, making it a robust choice for spec-driven API development in Python.

RATING8.7/10
QUALITY8.0/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS244
VELOCITY0.61
OPEN ISSUES184
CLOSED ISSUES984
LAST COMMIT2 months ago
Files by Type (count)
Python
120
YAML
82
reStructuredText
30
Other (no ext)
4
Other (.png)
4
Text
3
Markdown
2
Git Ignore
2
JSON
2
Makefile
1
CSS
1
JavaScript
1
Files by Type (size)
Other (.png)
1MB
Python
575KB
YAML
174KB
reStructuredText
125KB
JSON
73KB
Other (.excalidraw)
54KB
Other (no ext)
11KB
Markdown
10KB
Makefile
6KB
Other (.svg)
6KB
TOML
3KB
INI
1KB

The LLM identified 3 files worth highlighting for reuse:

Implements MediaTypeDict, a dict subclass with content-type-aware matching. It supports wildcard types (e.g., 'application/*'), quality factors, and case-insensitive keys. This is a self-contained, reusable data structure for media type negotiation, applicable in any HTTP framework or library that needs to match Accept/Content-Type headers against a set of supported types.

file: connexion/datastructures.py ↗ | tags: #media-type-matching #data-structure #content-negotiation

Provides a hierarchy of URI parsers (AbstractURIParser, OpenAPIURIParser, Swagger2URIParser, FirstValueURIParser, AlwaysMultiURIParser) that handle query, path, and header parameter parsing according to the OpenAPI/Swagger specification. Includes support for primitive types, arrays, and serialization styles (form, deepObject, etc.). The parsers are spec-aware, testable, and could be extracted for use in other OpenAPI tooling.

file: connexion/uri_parsing.py ↗ | tags: #uri-parsing #parameter-serialization #openapi

Contains JSON Schema validation logic with $ref resolution using a custom RefResolver. It validates request bodies, response bodies, and parameters against schema definitions from the OpenAPI spec. The validation is extensible and handles JSON Schema draft versions. This module is a standalone component for JSON Schema validation that could be reused in any Python project needing schema validation with reference resolution.

file: connexion/json_schema.py ↗ | tags: #json-schema #validation #ref-resolution
Last analyzed: 2026-09-04 11:11:49.646687
Next check: 2026-09-11 11:11:49.641474
$ submit: