fastapi_swagger2 0.4.0__tar.gz → 0.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastapi_swagger2
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: Swagger2 support for FastAPI framework
5
5
  Author: Viraj Kanwade
6
6
  Author-email: Viraj Kanwade <virajk.oib@gmail.com>
@@ -29,7 +29,7 @@ Classifier: Programming Language :: Python :: 3.12
29
29
  Classifier: Programming Language :: Python :: 3.13
30
30
  Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
31
31
  Classifier: Topic :: Internet :: WWW/HTTP
32
- Requires-Dist: fastapi>=0.137.0
32
+ Requires-Dist: fastapi>=0.137.2
33
33
  Requires-Dist: httpx>=0.28.1 ; extra == 'all'
34
34
  Requires-Dist: ruff==0.15.17 ; extra == 'dev'
35
35
  Requires-Dist: pytest>=9.0.0 ; extra == 'test'
@@ -68,19 +68,20 @@ Few API GW services like Google Cloud API GW still support only Swagger 2.0 spec
68
68
 
69
69
  ## Requirements
70
70
 
71
- Python 3.9+
71
+ Python 3.10+
72
72
 
73
- * 0.0.3 - FastAPI >= 0.79.0, <= 0.98.0
74
- * 0.1.1 - FastAPI >= 0.99.0, <= 0.99.1
75
- * 0.2.4 - FastAPI >= 0.100.0
76
- * 0.2.7 - FastAPI >= 0.100.0, < 0.119.0 + Pydantic v1/v2
77
- * 0.3.0 - FastAPI >= 0.119.0, <= 0.123.8 + Pydantic v1/v2
78
- * 0.3.1 - FastAPI >= 0.123.9, <= 0.127.1 + Pydantic v1/v2 (Since FastAPI 0.126.1, Pydantic v1 is deprecated)
79
- * 0.3.2 - FastAPI >= 0.128.0, <= 0.128.3
80
- * 0.3.3 - FastAPI >= 0.128.4, <= 0.128.8 (FastAPI has dropped Python 3.9 support since 0.129.1)
81
- * 0.3.4 - FastAPI >= 0.129.0 (last tested against 0.133.1)
73
+ * 0.4.1 - FastAPI >= 0.137.2
74
+ * 0.4.0 - FastAPI >= 0.137.0, <= 0.137.1
82
75
  * 0.3.5 - FastAPI >= 0.129.0, < 0.137.0
83
- * 0.4.0 - FastAPI >= 0.137.0
76
+ * 0.3.4 - FastAPI >= 0.129.0 (last tested against 0.133.1)
77
+ * 0.3.3 - FastAPI >= 0.128.4, <= 0.128.8 (FastAPI has dropped Python 3.9 support since 0.129.1)
78
+ * 0.3.2 - FastAPI >= 0.128.0, <= 0.128.3
79
+ * 0.3.1 - FastAPI >= 0.123.9, <= 0.127.1 + Pydantic v1/v2 (Since FastAPI 0.126.1, Pydantic v1 is deprecated)
80
+ * 0.3.0 - FastAPI >= 0.119.0, <= 0.123.8 + Pydantic v1/v2
81
+ * 0.2.7 - FastAPI >= 0.100.0, < 0.119.0 + Pydantic v1/v2
82
+ * 0.2.4 - FastAPI >= 0.100.0
83
+ * 0.1.1 - FastAPI >= 0.99.0, <= 0.99.1
84
+ * 0.0.3 - FastAPI >= 0.79.0, <= 0.98.0
84
85
 
85
86
  ## Installation
86
87
 
@@ -21,19 +21,20 @@ Few API GW services like Google Cloud API GW still support only Swagger 2.0 spec
21
21
 
22
22
  ## Requirements
23
23
 
24
- Python 3.9+
24
+ Python 3.10+
25
25
 
26
- * 0.0.3 - FastAPI >= 0.79.0, <= 0.98.0
27
- * 0.1.1 - FastAPI >= 0.99.0, <= 0.99.1
28
- * 0.2.4 - FastAPI >= 0.100.0
29
- * 0.2.7 - FastAPI >= 0.100.0, < 0.119.0 + Pydantic v1/v2
30
- * 0.3.0 - FastAPI >= 0.119.0, <= 0.123.8 + Pydantic v1/v2
31
- * 0.3.1 - FastAPI >= 0.123.9, <= 0.127.1 + Pydantic v1/v2 (Since FastAPI 0.126.1, Pydantic v1 is deprecated)
32
- * 0.3.2 - FastAPI >= 0.128.0, <= 0.128.3
33
- * 0.3.3 - FastAPI >= 0.128.4, <= 0.128.8 (FastAPI has dropped Python 3.9 support since 0.129.1)
34
- * 0.3.4 - FastAPI >= 0.129.0 (last tested against 0.133.1)
26
+ * 0.4.1 - FastAPI >= 0.137.2
27
+ * 0.4.0 - FastAPI >= 0.137.0, <= 0.137.1
35
28
  * 0.3.5 - FastAPI >= 0.129.0, < 0.137.0
36
- * 0.4.0 - FastAPI >= 0.137.0
29
+ * 0.3.4 - FastAPI >= 0.129.0 (last tested against 0.133.1)
30
+ * 0.3.3 - FastAPI >= 0.128.4, <= 0.128.8 (FastAPI has dropped Python 3.9 support since 0.129.1)
31
+ * 0.3.2 - FastAPI >= 0.128.0, <= 0.128.3
32
+ * 0.3.1 - FastAPI >= 0.123.9, <= 0.127.1 + Pydantic v1/v2 (Since FastAPI 0.126.1, Pydantic v1 is deprecated)
33
+ * 0.3.0 - FastAPI >= 0.119.0, <= 0.123.8 + Pydantic v1/v2
34
+ * 0.2.7 - FastAPI >= 0.100.0, < 0.119.0 + Pydantic v1/v2
35
+ * 0.2.4 - FastAPI >= 0.100.0
36
+ * 0.1.1 - FastAPI >= 0.99.0, <= 0.99.1
37
+ * 0.0.3 - FastAPI >= 0.79.0, <= 0.98.0
37
38
 
38
39
  ## Installation
39
40
 
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "fastapi_swagger2"
7
- version = "0.4.0"
7
+ version = "0.4.1"
8
8
  description = "Swagger2 support for FastAPI framework"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -39,7 +39,7 @@ classifiers = [
39
39
  "Topic :: Internet :: WWW/HTTP",
40
40
  ]
41
41
  dependencies = [
42
- "fastapi>=0.137.0",
42
+ "fastapi>=0.137.2",
43
43
  ]
44
44
 
45
45
  [project.urls]
@@ -0,0 +1 @@
1
+ __version__ = "0.4.1"
@@ -471,8 +471,8 @@ def get_swagger2(
471
471
  swagger2_version: str = "2.0",
472
472
  summary: str | None = None,
473
473
  description: str | None = None,
474
- routes: Sequence[BaseRoute],
475
- webhooks: Sequence[BaseRoute] | None = None,
474
+ routes: Sequence[BaseRoute | routing.RouteContext],
475
+ webhooks: Sequence[BaseRoute | routing.RouteContext] | None = None,
476
476
  tags: list[dict[str, Any]] | None = None,
477
477
  servers: list[dict[str, str | Any]] | None = None,
478
478
  terms_of_service: str | None = None,
@@ -509,8 +509,8 @@ def get_swagger2(
509
509
  separate_input_output_schemas=separate_input_output_schemas,
510
510
  )
511
511
 
512
- for route, route_context in routing._iter_routes_with_context(routes):
513
- api_route = _get_api_route_for_openapi(route, route_context)
512
+ for route_context in routing.iter_route_contexts(routes):
513
+ api_route = _get_api_route_for_openapi(route_context)
514
514
  if api_route is not None:
515
515
  result = get_swagger2_path(
516
516
  route=api_route,
@@ -1 +0,0 @@
1
- __version__ = "0.4.0"