flask-openapi 5.0.0rc1__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.
Files changed (156) hide show
  1. flask_openapi-5.0.0rc1/.github/ISSUE_TEMPLATE/bug_report.md +15 -0
  2. flask_openapi-5.0.0rc1/.github/dependabot.yml +6 -0
  3. flask_openapi-5.0.0rc1/.github/pull_request_template.md +7 -0
  4. flask_openapi-5.0.0rc1/.github/workflows/docs.yml +27 -0
  5. flask_openapi-5.0.0rc1/.github/workflows/publish.yml +26 -0
  6. flask_openapi-5.0.0rc1/.github/workflows/stale.yml +16 -0
  7. flask_openapi-5.0.0rc1/.github/workflows/tests.yml +48 -0
  8. flask_openapi-5.0.0rc1/.gitignore +141 -0
  9. flask_openapi-5.0.0rc1/CHANGELOG.md +398 -0
  10. flask_openapi-5.0.0rc1/CODE_OF_CONDUCT.md +128 -0
  11. flask_openapi-5.0.0rc1/CONTRIBUTING.md +42 -0
  12. flask_openapi-5.0.0rc1/LICENSE +21 -0
  13. flask_openapi-5.0.0rc1/PKG-INFO +250 -0
  14. flask_openapi-5.0.0rc1/README.md +204 -0
  15. flask_openapi-5.0.0rc1/docs/Changelog.md +2 -0
  16. flask_openapi-5.0.0rc1/docs/Contributing.md +2 -0
  17. flask_openapi-5.0.0rc1/docs/Example.md +283 -0
  18. flask_openapi-5.0.0rc1/docs/LICENSE.md +2 -0
  19. flask_openapi-5.0.0rc1/docs/Quickstart.md +203 -0
  20. flask_openapi-5.0.0rc1/docs/Quickstart.zh.md +166 -0
  21. flask_openapi-5.0.0rc1/docs/Reference/APIBlueprint.md +1 -0
  22. flask_openapi-5.0.0rc1/docs/Reference/APIView.md +1 -0
  23. flask_openapi-5.0.0rc1/docs/Reference/Models.md +69 -0
  24. flask_openapi-5.0.0rc1/docs/Reference/OpenAPI.md +1 -0
  25. flask_openapi-5.0.0rc1/docs/Usage/Configuration.md +99 -0
  26. flask_openapi-5.0.0rc1/docs/Usage/JSON.md +52 -0
  27. flask_openapi-5.0.0rc1/docs/Usage/Model_Config.md +16 -0
  28. flask_openapi-5.0.0rc1/docs/Usage/Request.md +178 -0
  29. flask_openapi-5.0.0rc1/docs/Usage/Response.md +100 -0
  30. flask_openapi-5.0.0rc1/docs/Usage/Route_Operation.md +317 -0
  31. flask_openapi-5.0.0rc1/docs/Usage/Specification.md +311 -0
  32. flask_openapi-5.0.0rc1/docs/Usage/UI_Templates.md +23 -0
  33. flask_openapi-5.0.0rc1/docs/assets/Snipaste_2022-03-19_15-10-06.png +0 -0
  34. flask_openapi-5.0.0rc1/docs/assets/Snipaste_2022-09-04_10-10-03.png +0 -0
  35. flask_openapi-5.0.0rc1/docs/assets/Snipaste_2023-06-02_11-05-11.png +0 -0
  36. flask_openapi-5.0.0rc1/docs/assets/Snipaste_2023-06-02_11-06-59.png +0 -0
  37. flask_openapi-5.0.0rc1/docs/assets/Snipaste_2023-06-02_11-08-40.png +0 -0
  38. flask_openapi-5.0.0rc1/docs/assets/image-20210525160157057.png +0 -0
  39. flask_openapi-5.0.0rc1/docs/assets/image-20210525160744617.png +0 -0
  40. flask_openapi-5.0.0rc1/docs/assets/image-20210525165350520.png +0 -0
  41. flask_openapi-5.0.0rc1/docs/assets/image-20210526104627124.png +0 -0
  42. flask_openapi-5.0.0rc1/docs/assets/image-20210605115557426.png +0 -0
  43. flask_openapi-5.0.0rc1/docs/assets/openapi-all.png +0 -0
  44. flask_openapi-5.0.0rc1/docs/images/logo-animation.svg +26 -0
  45. flask_openapi-5.0.0rc1/docs/images/logo-blue.svg +1 -0
  46. flask_openapi-5.0.0rc1/docs/images/logo-text.gif +0 -0
  47. flask_openapi-5.0.0rc1/docs/images/logo-text.svg +54 -0
  48. flask_openapi-5.0.0rc1/docs/images/logo-white.svg +1 -0
  49. flask_openapi-5.0.0rc1/docs/index.md +2 -0
  50. flask_openapi-5.0.0rc1/docs/index.zh.md +199 -0
  51. flask_openapi-5.0.0rc1/examples/api_blueprint_demo.py +64 -0
  52. flask_openapi-5.0.0rc1/examples/api_view_demo.py +65 -0
  53. flask_openapi-5.0.0rc1/examples/async_demo.py +49 -0
  54. flask_openapi-5.0.0rc1/examples/enum_demo.py +26 -0
  55. flask_openapi-5.0.0rc1/examples/header_demo.py +25 -0
  56. flask_openapi-5.0.0rc1/examples/image_demo.py +19 -0
  57. flask_openapi-5.0.0rc1/examples/init_oauth_demo.py +34 -0
  58. flask_openapi-5.0.0rc1/examples/just_flask.py +12 -0
  59. flask_openapi-5.0.0rc1/examples/nested_apiblueprint_demo.py +27 -0
  60. flask_openapi-5.0.0rc1/examples/openapi_extensions.py +22 -0
  61. flask_openapi-5.0.0rc1/examples/orjson_demo.py +39 -0
  62. flask_openapi-5.0.0rc1/examples/pydantic_custom_root_types.py +56 -0
  63. flask_openapi-5.0.0rc1/examples/response_demo.py +58 -0
  64. flask_openapi-5.0.0rc1/examples/rest_demo.py +122 -0
  65. flask_openapi-5.0.0rc1/examples/servers_demo.py +36 -0
  66. flask_openapi-5.0.0rc1/examples/simple_demo.py +32 -0
  67. flask_openapi-5.0.0rc1/examples/upload_file_demo.py +36 -0
  68. flask_openapi-5.0.0rc1/flask_openapi/__init__.py +38 -0
  69. flask_openapi-5.0.0rc1/flask_openapi/__version__.py +1 -0
  70. flask_openapi-5.0.0rc1/flask_openapi/blueprint.py +575 -0
  71. flask_openapi-5.0.0rc1/flask_openapi/commands.py +35 -0
  72. flask_openapi-5.0.0rc1/flask_openapi/endpoint.py +107 -0
  73. flask_openapi-5.0.0rc1/flask_openapi/models/__init__.py +83 -0
  74. flask_openapi-5.0.0rc1/flask_openapi/models/callback.py +15 -0
  75. flask_openapi-5.0.0rc1/flask_openapi/models/components.py +34 -0
  76. flask_openapi-5.0.0rc1/flask_openapi/models/contact.py +13 -0
  77. flask_openapi-5.0.0rc1/flask_openapi/models/data_type.py +15 -0
  78. flask_openapi-5.0.0rc1/flask_openapi/models/discriminator.py +12 -0
  79. flask_openapi-5.0.0rc1/flask_openapi/models/encoding.py +24 -0
  80. flask_openapi-5.0.0rc1/flask_openapi/models/example.py +16 -0
  81. flask_openapi-5.0.0rc1/flask_openapi/models/external_documentation.py +12 -0
  82. flask_openapi-5.0.0rc1/flask_openapi/models/file.py +24 -0
  83. flask_openapi-5.0.0rc1/flask_openapi/models/header.py +13 -0
  84. flask_openapi-5.0.0rc1/flask_openapi/models/info.py +20 -0
  85. flask_openapi-5.0.0rc1/flask_openapi/models/license.py +13 -0
  86. flask_openapi-5.0.0rc1/flask_openapi/models/link.py +20 -0
  87. flask_openapi-5.0.0rc1/flask_openapi/models/media_type.py +21 -0
  88. flask_openapi-5.0.0rc1/flask_openapi/models/oauth_flow.py +14 -0
  89. flask_openapi-5.0.0rc1/flask_openapi/models/oauth_flows.py +16 -0
  90. flask_openapi-5.0.0rc1/flask_openapi/models/operation.py +32 -0
  91. flask_openapi-5.0.0rc1/flask_openapi/models/parameter.py +31 -0
  92. flask_openapi-5.0.0rc1/flask_openapi/models/parameter_in_type.py +10 -0
  93. flask_openapi-5.0.0rc1/flask_openapi/models/path_item.py +33 -0
  94. flask_openapi-5.0.0rc1/flask_openapi/models/paths.py +6 -0
  95. flask_openapi-5.0.0rc1/flask_openapi/models/reference.py +11 -0
  96. flask_openapi-5.0.0rc1/flask_openapi/models/request_body.py +15 -0
  97. flask_openapi-5.0.0rc1/flask_openapi/models/response.py +19 -0
  98. flask_openapi-5.0.0rc1/flask_openapi/models/responses.py +7 -0
  99. flask_openapi-5.0.0rc1/flask_openapi/models/schema.py +56 -0
  100. flask_openapi-5.0.0rc1/flask_openapi/models/security_requirement.py +5 -0
  101. flask_openapi-5.0.0rc1/flask_openapi/models/security_scheme.py +21 -0
  102. flask_openapi-5.0.0rc1/flask_openapi/models/security_scheme_in_type.py +9 -0
  103. flask_openapi-5.0.0rc1/flask_openapi/models/server.py +15 -0
  104. flask_openapi-5.0.0rc1/flask_openapi/models/server_variable.py +13 -0
  105. flask_openapi-5.0.0rc1/flask_openapi/models/style_values.py +11 -0
  106. flask_openapi-5.0.0rc1/flask_openapi/models/tag.py +15 -0
  107. flask_openapi-5.0.0rc1/flask_openapi/models/validation_error.py +17 -0
  108. flask_openapi-5.0.0rc1/flask_openapi/models/xml.py +15 -0
  109. flask_openapi-5.0.0rc1/flask_openapi/openapi.py +812 -0
  110. flask_openapi-5.0.0rc1/flask_openapi/plugins.py +12 -0
  111. flask_openapi-5.0.0rc1/flask_openapi/py.typed +0 -0
  112. flask_openapi-5.0.0rc1/flask_openapi/request.py +244 -0
  113. flask_openapi-5.0.0rc1/flask_openapi/templates.py +108 -0
  114. flask_openapi-5.0.0rc1/flask_openapi/types.py +19 -0
  115. flask_openapi-5.0.0rc1/flask_openapi/utils.py +538 -0
  116. flask_openapi-5.0.0rc1/flask_openapi/view.py +227 -0
  117. flask_openapi-5.0.0rc1/mkdocs.yml +114 -0
  118. flask_openapi-5.0.0rc1/pyproject.toml +97 -0
  119. flask_openapi-5.0.0rc1/tests/test_api_blueprint.py +172 -0
  120. flask_openapi-5.0.0rc1/tests/test_api_view.py +142 -0
  121. flask_openapi-5.0.0rc1/tests/test_api_view_args.py +58 -0
  122. flask_openapi-5.0.0rc1/tests/test_async.py +83 -0
  123. flask_openapi-5.0.0rc1/tests/test_command.py +29 -0
  124. flask_openapi-5.0.0rc1/tests/test_default_query.py +33 -0
  125. flask_openapi-5.0.0rc1/tests/test_empty_body.py +36 -0
  126. flask_openapi-5.0.0rc1/tests/test_enum.py +42 -0
  127. flask_openapi-5.0.0rc1/tests/test_form.py +127 -0
  128. flask_openapi-5.0.0rc1/tests/test_list_with_default_value.py +42 -0
  129. flask_openapi-5.0.0rc1/tests/test_model_config.py +93 -0
  130. flask_openapi-5.0.0rc1/tests/test_model_extra.py +70 -0
  131. flask_openapi-5.0.0rc1/tests/test_multi_decorator.py +39 -0
  132. flask_openapi-5.0.0rc1/tests/test_nested_apiblueprint.py +56 -0
  133. flask_openapi-5.0.0rc1/tests/test_number_constraints.py +38 -0
  134. flask_openapi-5.0.0rc1/tests/test_openapi.py +512 -0
  135. flask_openapi-5.0.0rc1/tests/test_openapi_extensions.py +61 -0
  136. flask_openapi-5.0.0rc1/tests/test_options_in_viewfunc.py +62 -0
  137. flask_openapi-5.0.0rc1/tests/test_populate_by_name.py +129 -0
  138. flask_openapi-5.0.0rc1/tests/test_pydantic_calculated_fields.py +39 -0
  139. flask_openapi-5.0.0rc1/tests/test_pydantic_custom_root_types.py +83 -0
  140. flask_openapi-5.0.0rc1/tests/test_pydantic_validation_error.py +101 -0
  141. flask_openapi-5.0.0rc1/tests/test_request.py +160 -0
  142. flask_openapi-5.0.0rc1/tests/test_response.py +56 -0
  143. flask_openapi-5.0.0rc1/tests/test_restapi.py +222 -0
  144. flask_openapi-5.0.0rc1/tests/test_restapi_with_doc_prefix.py +36 -0
  145. flask_openapi-5.0.0rc1/tests/test_security.py +39 -0
  146. flask_openapi-5.0.0rc1/tests/test_server.py +28 -0
  147. flask_openapi-5.0.0rc1/tests/test_str_body.py +29 -0
  148. flask_openapi-5.0.0rc1/tests/test_summary.py +43 -0
  149. flask_openapi-5.0.0rc1/tests/test_tags.py +44 -0
  150. flask_openapi-5.0.0rc1/tests/test_trail_slash.py +59 -0
  151. flask_openapi-5.0.0rc1/tests/test_url_prefix.py +65 -0
  152. flask_openapi-5.0.0rc1/tests/test_utils.py +5 -0
  153. flask_openapi-5.0.0rc1/tests/test_validate_request.py +108 -0
  154. flask_openapi-5.0.0rc1/tests/test_validate_responses.py +194 -0
  155. flask_openapi-5.0.0rc1/tests/test_validation_error.py +77 -0
  156. flask_openapi-5.0.0rc1/uv.lock +1221 -0
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: bug
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ Environment:
11
+
12
+ - Python version:
13
+ - Operating system:
14
+ - Flask version:
15
+ - flask-openapi version:
@@ -0,0 +1,6 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
@@ -0,0 +1,7 @@
1
+ Checklist:
2
+
3
+ - [ ] Run `pytest tests` and no failed.
4
+ - [ ] Run `ruff check flask_openapi tests examples` and no failed.
5
+ - [ ] Run `ruff format flask_openapi tests examples` and no failed.
6
+ - [ ] Run `ty check flask_openapi` and no failed.
7
+ - [ ] Run `mkdocs serve` and no failed.
@@ -0,0 +1,27 @@
1
+ name: mkdocs
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+
7
+ jobs:
8
+ docs:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - uses: actions/checkout@v6
13
+
14
+ - uses: astral-sh/setup-uv@v7
15
+ with:
16
+ enable-cache: true
17
+
18
+ - name: Install dependencies
19
+ run: uv sync
20
+
21
+ - name: Build docs
22
+ run: |
23
+ git config --local user.email "action@github.com"
24
+ git config --local user.name "GitHub Action"
25
+ git fetch origin gh-pages:gh-pages
26
+ uv run mike deploy v5.x latest --update-aliases
27
+ git push origin gh-pages
@@ -0,0 +1,26 @@
1
+ name: publish
2
+
3
+ on:
4
+ release:
5
+ types: [ created ]
6
+
7
+ jobs:
8
+ publish:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - uses: actions/checkout@v6
13
+
14
+ - uses: astral-sh/setup-uv@v7
15
+ with:
16
+ enable-cache: true
17
+
18
+ - name: Install dependencies
19
+ run: uv sync
20
+
21
+ - name: Build and publish
22
+ env:
23
+ UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
24
+ run: |
25
+ uv build
26
+ uv publish
@@ -0,0 +1,16 @@
1
+ name: stale
2
+ on:
3
+ schedule:
4
+ # Executed on the 1st day of each month
5
+ - cron: "0 0 1 * *"
6
+
7
+ jobs:
8
+ stale:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/stale@v10
12
+ with:
13
+ days-before-issue-close: 365
14
+ close-issue-message: >
15
+ This issue has been automatically closed because we haven't heard back for more than 365 days,
16
+ please reopen this issue if necessary.
@@ -0,0 +1,48 @@
1
+ name: tests
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ paths:
7
+ - "flask_openapi/**"
8
+ - "tests/**"
9
+
10
+ pull_request:
11
+ branches: [ main ]
12
+ paths:
13
+ - "flask_openapi/**"
14
+ - "tests/**"
15
+
16
+ jobs:
17
+ tests:
18
+ runs-on: ubuntu-latest
19
+
20
+ strategy:
21
+ max-parallel: 5
22
+ matrix:
23
+ python-version: [ "3.11", "3.12", "3.13", "3.14" ]
24
+ env:
25
+ PYTHONPATH: .
26
+
27
+ steps:
28
+ - uses: actions/checkout@v6
29
+
30
+ - uses: astral-sh/setup-uv@v7
31
+ with:
32
+ python-version: ${{ matrix.python-version }}
33
+ enable-cache: true
34
+
35
+ - name: Install dependencies
36
+ run: uv sync
37
+
38
+ - name: Test with pytest
39
+ run: uv run pytest tests
40
+
41
+ - name: ruff check
42
+ run: uv run ruff check flask_openapi tests examples
43
+
44
+ - name: ruff format
45
+ run: uv run ruff format --check flask_openapi tests examples
46
+
47
+ - name: Run ty
48
+ run: uv run ty check flask_openapi
@@ -0,0 +1,141 @@
1
+ ### Python template
2
+ # Byte-compiled / optimized / DLL files
3
+ __pycache__/
4
+ *.py[cod]
5
+ *$py.class
6
+
7
+ # C extensions
8
+ *.so
9
+
10
+ # Distribution / packaging
11
+ .Python
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ # For a library or package, you might want to ignore these files since the code is
88
+ # intended to run in multiple environments; otherwise, check them in:
89
+ # .python-version
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ #Pipfile.lock
97
+
98
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
99
+ __pypackages__/
100
+
101
+ # Celery stuff
102
+ celerybeat-schedule
103
+ celerybeat.pid
104
+
105
+ # SageMath parsed files
106
+ *.sage.py
107
+
108
+ # Environments
109
+ .env
110
+ .venv
111
+ env/
112
+ venv/
113
+ ENV/
114
+ env.bak/
115
+ venv.bak/
116
+
117
+ # Spyder project settings
118
+ .spyderproject
119
+ .spyproject
120
+
121
+ # Rope project settings
122
+ .ropeproject
123
+
124
+ # mkdocs documentation
125
+ /site
126
+
127
+ # mypy
128
+ .mypy_cache/
129
+ .dmypy.json
130
+ dmypy.json
131
+
132
+ # Pyre type checker
133
+ .pyre/
134
+
135
+ # pytype static type analyzer
136
+ .pytype/
137
+
138
+ # Cython debug symbols
139
+ cython_debug/
140
+
141
+ .idea
@@ -0,0 +1,398 @@
1
+ ## v4.3.1 2026-01-12
2
+
3
+ - Allow const to be Any type by @alchzh in #248
4
+ - Fix no attribute 'validate_response' by @luolingchun in #251
5
+ - Fix empty responses by @luolingchun in #252
6
+
7
+ ## v4.3.0 2025-10-18
8
+
9
+ - Fix ValidationError schema to match Pydantic v2 format by @bastien-pruvost in #232
10
+ - Bump actions/checkout from 4 to 5 by @dependabot[bot] in #234
11
+ - Support optional lists by @Qblack in #237
12
+ - Bump actions/stale from 9 to 10 by @dependabot[bot] in #239
13
+ - Bump actions/setup-python from 5 to 6 by @dependabot[bot] in #238
14
+ - [#240] Fix for br tag rendering by @zakmatik in #241
15
+ - Use uv by @luolingchun in #235
16
+ - Drop support for Python 3.9 and Support for Python 3.14 by @luolingchun in #233
17
+ - ISSUE-220 allow for response validation by @mr-tabasco in #225
18
+ - WIP Add support for const by @githubjakob in #243
19
+
20
+ ## v4.2.1 2025-07-19
21
+
22
+ - Fixes issue where register_api isn't idempotent by @zakmatik in #230
23
+ - Make validate_request pass on existing kwargs but remove those part of path by @puittenbroek in #227
24
+
25
+ ## v4.2.0 2025-06-21
26
+
27
+ - fix(models): enable 'populate_by_name' to alias fields correctly by @omikader in #221
28
+ - operation_id_callback with blueprint name and func name by @luolingchun in #224
29
+ - Delay throwing validation error by @luolingchun in #223
30
+
31
+ ## v4.1.0 2025-02-08
32
+
33
+ - Support for Python 3.13 by @luolingchun in #200
34
+ - Fix query, form, header model extra not honored by @luolingchun in #201
35
+ - Better APISpec init to allow to modify it before generating spec_json. by @ddorian in #195
36
+ - Schema.maximum type float -> int | float by @ddorian in #217
37
+ - Allow url_prefix to be set during API/APIView registration by @luolingchun in #215
38
+ - Drop support for Python 3.8 by @luolingchun in #199
39
+
40
+ ## v4.0.3 2024-11-23
41
+
42
+ - Add PrefixItems to Schema Model for use with Tuple types by @JesseDeLoore in #197
43
+
44
+ ## v4.0.2 2024-11-10
45
+
46
+ - Reuse schema["title"] if it's defined by @ddorian in #186
47
+ - Simple webhook schema by @ddorian in #191
48
+ - Fix missing Field.default when it's value is None in openapi spec by @ddorian in #189
49
+ - ServerVariable.enum should be optional by @luolingchun in #194
50
+
51
+ ## v4.0.1 2024-10-05
52
+
53
+ - Fix alias in query and form by @luolingchun in #184
54
+
55
+ ## v4.0.0 2024-09-29
56
+
57
+ * Support plugins for ui templates by @luolingchun in #151
58
+ * Add py.typed marker file for PEP-561 support by @luolingchun in #160
59
+ * Use ruff instead of flake8 by @luolingchun in #164
60
+ * Remove experimental export markdown by @luolingchun in #161
61
+ * Fix `populate_by_name` when execute `model_validate` by @luolingchun in #167
62
+ * Update docs by @luolingchun in #155
63
+ * Fix __get_pydantic_core_schema__ by @luolingchun in #179
64
+ * Fix list with default value by @luolingchun in #180
65
+
66
+ ## v4.0.0rc3 2024-08-31
67
+
68
+ - Add py.typed marker file for PEP-561 support by @luolingchun in #160
69
+ - Use ruff instead of flake8 by @luolingchun in #164
70
+ - Remove experimental export markdown by @luolingchun in #161
71
+ - Fix `populate_by_name` when execute `model_validate` by @luolingchun in #167
72
+ - Optimize performance and unit testing by @luolingchun in #155
73
+
74
+ ## v4.0.0rc2 2024-06-16
75
+
76
+ - Fix empty list in body by @luolingchun in #154
77
+
78
+ ## v4.0.0rc1 2024-06-02
79
+
80
+ - Support plugins for ui templates
81
+ - Support for OPENAPI_HTML_STRING in app.config
82
+
83
+ ## v3.1.3 2024-06-16
84
+
85
+ - Fix empty list in body by @luolingchun in #154
86
+
87
+ ## v3.1.2 2024-06-02
88
+
89
+ - Support SWAGGER_CONFIG and OAUTH_CONFIG in app.config by @luolingchun in #153
90
+
91
+ **DeprecationWarning**
92
+
93
+ - The `api_doc_url` is deprecated in v4.x, use `doc_url` instead.
94
+ - The `swagger_url` is deprecated in v4.x.
95
+ - The `redoc_url` is deprecated in v4.x.
96
+ - The `rapidoc_url` is deprecated in v4.x.
97
+ - The `oauth_config` is deprecated in v4.x, use `app.config['OAUTH_CONFIG']` instead.
98
+ - The `doc_expansion` is deprecated in v4.x, use `app.config['SWAGGER_CONFIG']` instead.
99
+ - The `swagger_config` is deprecated in v4.x, use `app.config['SWAGGER_CONFIG']` instead.
100
+ - The `ui_templates` is deprecated in v4.x.
101
+
102
+ ## v3.1.1 2024-04-21
103
+
104
+ - Wrong types of exclusiveMinimum & exclusiveMaximum fields in Schema class by @Lavertis in #149
105
+
106
+ ## v3.1.0 2024-03-24
107
+
108
+ - Add the swagger_config parameter to configure the swagger ui by @luolingchun in #146
109
+ - Use full links in Swagger and RapiDoc
110
+ - Upgrade Redoc to 2.1.3
111
+ - Upgrade Swagger to 5.12.0
112
+
113
+ **DeprecationWarning**
114
+
115
+ - The doc_expansion parameter is deprecated; use swagger_config instead.
116
+
117
+ ## v3.0.2 2024-01-28
118
+
119
+ - Fix missing Pydantic Calculated Fields (#141). Thanks, @thebmw.
120
+
121
+ ## v3.0.1 2023-11-26
122
+
123
+ - Fix the same operationId in APIBlueprint (#133). Thanks, @fluffybrain3.
124
+ - Make body required false (#130). Thanks, @styper.
125
+ - The default value defined in the form is invalid (#129). Thanks, @seekplum.
126
+
127
+ ## v3.0.0 2023-10-22
128
+
129
+ - Upgrade pydantic to v2.
130
+ - Remove deprecated code.
131
+ - Drop support for Python 3.7.
132
+ - support for raw requests (#109).
133
+ - Upgrade Swagger UI v5.9.0.
134
+ - Upgrade Redoc v2.1.2
135
+ - Update RapiDoc 9.3.4.
136
+ - [#105](https://github.com/luolingchun/flask-openapi/pull/105) Supports valid properties only. Thanks, @ota42y.
137
+ - [#106](https://github.com/luolingchun/flask-openapi/pull/106) Bugfix for parameter object. Thanks, @ota42y.
138
+ - [#107](https://github.com/luolingchun/flask-openapi/pull/107) Bugfix for generics class. Thanks, @ota42y.
139
+ - [#114](https://github.com/luolingchun/flask-openapi/pull/114) Support Flask 3.0.
140
+ - [#118](https://github.com/luolingchun/flask-openapi/discussions/118) Fix missed components schemas in
141
+ ValidationErrorModel. Thanks, @SeFeX.
142
+ - [#122](https://github.com/luolingchun/flask-openapi/issues/122) Skip 422 response non parameters. Thanks, @Danielsn1.
143
+
144
+ ## v3.0.0rc2 2023-10-03
145
+
146
+ - [#105](https://github.com/luolingchun/flask-openapi/pull/105) Supports valid properties only. Thanks, @ota42y.
147
+ - [#106](https://github.com/luolingchun/flask-openapi/pull/106) Bugfix for parameter object. Thanks, @ota42y.
148
+ - [#107](https://github.com/luolingchun/flask-openapi/pull/107) Bugfix for generics class. Thanks, @ota42y.
149
+ - [#114](https://github.com/luolingchun/flask-openapi/pull/114) Support Flask 3.0.
150
+
151
+ ## v3.0.0rc1 2023-09-03
152
+
153
+ - Upgrade pydantic to v2
154
+ - Remove deprecated code
155
+ - Drop support for Python 3.7
156
+
157
+ ## v2.5.5 2023-11-26
158
+
159
+ - Fix the same operationId in APIBlueprint (#133). Thanks, @fluffybrain3.
160
+ - Make body required false (#130). Thanks, @styper.
161
+ - The default value defined in the form is invalid (#129). Thanks, @seekplum.
162
+
163
+ ## v2.5.4 2023-10-22
164
+
165
+ - [#118](https://github.com/luolingchun/flask-openapi/discussions/118) Fix missed components schemas in
166
+ ValidationErrorModel. Thanks, @SeFeX.
167
+ - [#122](https://github.com/luolingchun/flask-openapi/issues/122) Skip 422 response non parameters. Thanks, @Danielsn1.
168
+
169
+ ## v2.5.3 2023-10-03
170
+
171
+ - [#105](https://github.com/luolingchun/flask-openapi/pull/105) Supports valid properties only. Thanks, @ota42y.
172
+ - [#106](https://github.com/luolingchun/flask-openapi/pull/106) Bugfix for parameter object. Thanks, @ota42y.
173
+ - [#107](https://github.com/luolingchun/flask-openapi/pull/107) Bugfix for generics class. Thanks, @ota42y.
174
+
175
+ ## v2.5.2 2023-08-13
176
+
177
+ - [#97](https://github.com/luolingchun/flask-openapi/issues/97) Fix response miss description. Thanks, @tekrei.
178
+
179
+ ## v2.5.1 2023-08-07
180
+
181
+ - [#95](https://github.com/luolingchun/flask-openapi/pull/95) Added ability to deserialize complex form parameter
182
+ objects. Thanks, @BlackGad.
183
+
184
+ ## v2.5.0 2023-08-02
185
+
186
+ - [#79](https://github.com/luolingchun/flask-openapi/discussions/79) Support `by_alias` in Model Config. Thanks,
187
+ @candleindark.
188
+ - [#82](https://github.com/luolingchun/flask-openapi/issues/82) Fix parameter in url_prefix. Thanks, @riedgar-ms.
189
+ - [#83](https://github.com/luolingchun/flask-openapi/pull/83) Be able to change 422 validation errors to other http
190
+ response status. Thanks, @CostcoFanboy.
191
+ - [#86](https://github.com/luolingchun/flask-openapi/issues/86) Responses key supports both string, int, and
192
+ HTTPStatus. Thanks, @CostcoFanboy.
193
+
194
+ ## v2.4.0 2023-06-04
195
+
196
+ - [#72](https://github.com/luolingchun/flask-openapi/pull/72) security_schemes(SecurityScheme) supports a json format.
197
+ - [#68](https://github.com/luolingchun/flask-openapi/pull/68) feat: Add operation_id_callback. Thanks, @BoyanYK.
198
+ - [#64](https://github.com/luolingchun/flask-openapi/pull/64) Explains the usage of flask openapi command more clearly.
199
+ Thanks, @candleindark.
200
+ - [#75](https://github.com/luolingchun/flask-openapi/pull/75) Init view_class and pass view_kwargs. Thanks, @stufisher.
201
+ - [#70](https://github.com/luolingchun/flask-openapi/issues/70) Support for Specification Extensions in OpenAPI Object
202
+ and Operation Object. Thanks, @simonblund.
203
+ - [#73](https://github.com/luolingchun/flask-openapi/issues/73) BaseModel Config support openapi_extra.
204
+ - Merge `extra_responses` to `responses` and deprecate `extra_responses`.
205
+
206
+ **DeprecationWarning:**
207
+
208
+ - Add DeprecationWarning to `APIKey`, `HTTPBase`, `OAuth2`, `OpenIdConnect`, `HTTPBearer` that will be deprecated in
209
+ v3.0.
210
+ - Add DeprecationWarning to `extra_form`, `extra_body` and `extra_responses` that will be deprecated in v3.0.
211
+
212
+ ## v2.3.2 2023-04-03
213
+
214
+ - [#61](https://github.com/luolingchun/flask-openapi/issues/61) Fix headers with pydantic alias
215
+
216
+ ## v2.3.1 2023-02-13
217
+
218
+ - remove * in install_requires for setuptools 67+
219
+
220
+ ## v2.3.0 2023-02-12
221
+
222
+ - Support for custom UI templates (#55)
223
+ - endpoint index rename to openapi
224
+ - fix missing enum in component schemas
225
+
226
+ ## v2.2.2 2023-01-01
227
+
228
+ - Fix async
229
+ - Fix duplicate tags
230
+
231
+ ## v2.2.1 2022-11-23
232
+
233
+ - Add dependent files
234
+
235
+ ## v2.2.0 2022-11-14
236
+
237
+ - support APIView
238
+ - Add mypy
239
+ - Support for python 3.11
240
+ - Upgrade Swagger UI 4.15.5
241
+ - Upgrade Redoc UI 2.0.0
242
+
243
+ ## v2.1.1 2022-10-12
244
+
245
+ - [#41](https://github.com/luolingchun/flask-openapi/issues/41) Set the `requestBody required` default value to True.
246
+ Thanks, @Colin-b
247
+ - Fix multi decorator for api
248
+ - [#42](https://github.com/luolingchun/flask-openapi/issues/42) Fix required header is not found when `_` in header
249
+ field. Thanks, @elirud
250
+
251
+ ## v2.1.0 2022-09-04
252
+
253
+ - [#36](https://github.com/luolingchun/flask-openapi/issues/36) Add extra_form for operation. Thanks, @Colin-b
254
+ - [#36](https://github.com/luolingchun/flask-openapi/issues/36) Add extra_body for operation. Thanks, @Colin-b
255
+ - Add external_docs for operation
256
+ - Add servers for operation
257
+ - Support to parse extra field in parameters
258
+ - [#35](https://github.com/luolingchun/flask-openapi/issues/35) Fixed extra_responses can now be used to set every
259
+ field in Response. Thanks, @Colin-b
260
+ - Upgrade Swagger UI 4.14.0
261
+ - Upgrade Redoc UI 2.0.0-rc.76
262
+ - Upgrade RapiDoc UI 9.3.3
263
+
264
+ ### Breaking Changes
265
+
266
+ - [#39](https://github.com/luolingchun/flask-openapi/issues/39) Remove configuration FLASK_OPENAPI_VALIDATE_RESPONSE
267
+
268
+ ## v2.0.1 2022-08-07
269
+
270
+ - [#32](https://github.com/luolingchun/flask-openapi/issues/32) Fix: parse_rule is deprecated in werkzeug>=2.2.0.
271
+
272
+ ## v2.0.0 2022-06-26
273
+
274
+ - [#26](https://github.com/luolingchun/flask-openapi/issues/26) Fixed: Body throws exception when receiving str instead
275
+ of dict. Thanks, @nor3th
276
+ - [#23](https://github.com/luolingchun/flask-openapi/pull/23) Fixed externalDocs support. Thanks, @dvaerum
277
+ - [#28](https://github.com/luolingchun/flask-openapi/pull/28) Fixed to enable `__root__` property when validation
278
+ responses. Thanks, @dvaerum
279
+ - [#17](https://github.com/luolingchun/flask-openapi/issues/17) Support for Nested APIBlueprint enhancement. Thanks,
280
+ @dvaerum
281
+ - [#29](https://github.com/luolingchun/flask-openapi/pull/29) Support disable warnings. Thanks, @dvaerum
282
+ - Support for empty response body. Thanks, @dvaerum
283
+ - Support reload authorizations in Swagger UI
284
+ - Add `flask openapi` command
285
+ - Add options in view functions
286
+ - Upgrade flask to v2.x
287
+
288
+ ### Breaking Changes
289
+
290
+ - Remove export markdown to `flask openapi` command
291
+ - Configuration `VALIDATE_RESPONSE` rename to `FLASK_OPENAPI_VALIDATE_RESPONSE`
292
+
293
+ ## v1.1.4 2022-05-05
294
+
295
+ - fix: Trailing slash in APIBlueprint
296
+
297
+ ## v1.1.3 2022-05-01
298
+
299
+ - fix: Find globalns for the unwrapped func
300
+ - [#19](https://github.com/luolingchun/flask-openapi/issues/19) fix: Trailing slash in APIBlueprint. Thanks, @ev-agelos
301
+ - add description for UnprocessableEntity
302
+ - remove printouts in `__init__.py`
303
+
304
+ ## v1.1.2 2022-04-01
305
+
306
+ - [#16](https://github.com/luolingchun/flask-openapi/issues/16) Fix fileStorage list is not supported. Thanks, @tekrei
307
+
308
+ ## v1.1.0 2022-03-13
309
+
310
+ - [#13](https://github.com/luolingchun/flask-openapi/issues/13) drop support for flask 1.0.x. Thanks, @danmur
311
+ - [#15](https://github.com/luolingchun/flask-openapi/pull/15) Fix to enable BaseModel with `__root__` property. Thanks,
312
+ @tarcisiojr
313
+ - [#14](https://github.com/luolingchun/flask-openapi/pull/14) Custom parameters: doc_prefix, api_doc_url, swagger_url,
314
+ redoc_url, rapidoc_url. Thanks, @barryrobison
315
+ - Upgrade swagger UI v4.6.2
316
+ - Upgrade Redoc v2.0.0-rc.63
317
+ - Upgrade RapiDoc v9.2.0
318
+
319
+ ## v1.0.1 2022-02-12
320
+
321
+ - add operation_id for OpenAPI Specification
322
+
323
+ ## v1.0.0 2022-01-11
324
+
325
+ - [#10](https://github.com/luolingchun/flask-openapi/issues/10) Fix: header's title case. Thanks, @rrr34
326
+ - [#9](https://github.com/luolingchun/flask-openapi/issues/9) Support for extra responses. Thanks, @blynn99
327
+ - [#12](https://github.com/luolingchun/flask-openapi/pull/12) Support for path operation field deprecated. Thanks,
328
+ @blynn99
329
+ - Add keyword parameters `summary` and `description`
330
+ - Add servers for OpenAPI
331
+ - Upgrade swagger UI v4.1.3
332
+ - Upgrade Redoc v2.0.0-rc.59
333
+ - Add rapidoc
334
+
335
+ ### Breaking Changes
336
+
337
+ - Renamed `securitySchemes` to `security_schemes`
338
+ - Renamed `docExpansion` to `doc_expansion`
339
+
340
+ ## v0.9.9 2021-12-09
341
+
342
+ - fix: default value in a query and form model
343
+ - fix: empty form and body
344
+ - support `from __future__ import annotations`
345
+ - drop python36
346
+
347
+ ## v0.9.8 2021-11-12
348
+
349
+ - add Configuration `docExpansion`
350
+ - query and form add array support
351
+
352
+ ## v0.9.7 2021-08-19
353
+
354
+ - fix: path $ref
355
+ - fix: markdown enum
356
+
357
+ ## v0.9.6 2021-08-18
358
+
359
+ - Export to markdown(Experimental)
360
+
361
+ ## v0.9.5 2021-07-11
362
+
363
+ - remove `validate_resp` and add `VALIDATE_RESPONSE`
364
+
365
+ ## v0.9.4 2021-07-03
366
+
367
+ - OpenAPI add responses and APIBlueprint add abp_responses
368
+ - fix: validate response error when responses is empty dict
369
+ - [#3](https://github.com/luolingchun/flask-openapi/issues/3) endpoint and APIBlueprint add `doc_ui`. Thanks,
370
+ @DerManoMann
371
+ - [#4](https://github.com/luolingchun/flask-openapi/issues/4) fix: response description. Thanks, @DerManoMann
372
+ - [#5](https://github.com/luolingchun/flask-openapi/issues/5) add custom parameter `oauth_config`. Thanks, @DerManoMann
373
+ - [#6](https://github.com/luolingchun/flask-openapi/issues/6) support validation Flask Response. Thanks, @DerManoMann
374
+ - [#7](https://github.com/luolingchun/flask-openapi/issues/7) fix: response validation does not work when uses
375
+ http.HTTPStatus enums as status_code. Thanks, @DerManoMann
376
+
377
+ ## v0.9.3 2021-06-08
378
+
379
+ - APIBlueprint adds abp_tags and abp_security
380
+ - fix: tags de-duplication
381
+ - fix: operation summary and description
382
+
383
+ ## v0.9.2 2021-05-17
384
+
385
+ - fix: _do_decorator
386
+ - add doc_ui args. support close swagger UI and redoc
387
+
388
+ ## v0.9.1 2021-05-16
389
+
390
+ - fix:request data is None
391
+ - json-->body
392
+ - set 422 Content-Type application/json
393
+ - raise response validate exception
394
+ - fix: TypeError: issubclass() arg 1 must be a class
395
+
396
+ ## v0.9.0 2021-05-13
397
+
398
+ - first version