flask-openapi 5.0.0__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.
- flask_openapi-5.0.0/.github/ISSUE_TEMPLATE/bug_report.md +15 -0
- flask_openapi-5.0.0/.github/dependabot.yml +6 -0
- flask_openapi-5.0.0/.github/pull_request_template.md +7 -0
- flask_openapi-5.0.0/.github/workflows/docs.yml +27 -0
- flask_openapi-5.0.0/.github/workflows/publish.yml +26 -0
- flask_openapi-5.0.0/.github/workflows/stale.yml +16 -0
- flask_openapi-5.0.0/.github/workflows/tests.yml +48 -0
- flask_openapi-5.0.0/.gitignore +141 -0
- flask_openapi-5.0.0/CHANGELOG.md +418 -0
- flask_openapi-5.0.0/CODE_OF_CONDUCT.md +128 -0
- flask_openapi-5.0.0/CONTRIBUTING.md +42 -0
- flask_openapi-5.0.0/LICENSE +21 -0
- flask_openapi-5.0.0/PKG-INFO +253 -0
- flask_openapi-5.0.0/README.md +206 -0
- flask_openapi-5.0.0/docs/Changelog.md +2 -0
- flask_openapi-5.0.0/docs/Contributing.md +2 -0
- flask_openapi-5.0.0/docs/Example.md +283 -0
- flask_openapi-5.0.0/docs/LICENSE.md +2 -0
- flask_openapi-5.0.0/docs/Quickstart.md +203 -0
- flask_openapi-5.0.0/docs/Quickstart.zh.md +166 -0
- flask_openapi-5.0.0/docs/Reference/APIBlueprint.md +1 -0
- flask_openapi-5.0.0/docs/Reference/APIView.md +1 -0
- flask_openapi-5.0.0/docs/Reference/Models.md +69 -0
- flask_openapi-5.0.0/docs/Reference/OpenAPI.md +1 -0
- flask_openapi-5.0.0/docs/Usage/Configuration.md +99 -0
- flask_openapi-5.0.0/docs/Usage/JSON.md +52 -0
- flask_openapi-5.0.0/docs/Usage/Model_Config.md +16 -0
- flask_openapi-5.0.0/docs/Usage/Request.md +239 -0
- flask_openapi-5.0.0/docs/Usage/Response.md +99 -0
- flask_openapi-5.0.0/docs/Usage/Route_Operation.md +321 -0
- flask_openapi-5.0.0/docs/Usage/Specification.md +312 -0
- flask_openapi-5.0.0/docs/Usage/UI_Templates.md +23 -0
- flask_openapi-5.0.0/docs/assets/Snipaste_2022-03-19_15-10-06.png +0 -0
- flask_openapi-5.0.0/docs/assets/Snipaste_2022-09-04_10-10-03.png +0 -0
- flask_openapi-5.0.0/docs/assets/Snipaste_2023-06-02_11-05-11.png +0 -0
- flask_openapi-5.0.0/docs/assets/Snipaste_2023-06-02_11-06-59.png +0 -0
- flask_openapi-5.0.0/docs/assets/Snipaste_2023-06-02_11-08-40.png +0 -0
- flask_openapi-5.0.0/docs/assets/image-20210525160157057.png +0 -0
- flask_openapi-5.0.0/docs/assets/image-20210525160744617.png +0 -0
- flask_openapi-5.0.0/docs/assets/image-20210525165350520.png +0 -0
- flask_openapi-5.0.0/docs/assets/image-20210526104627124.png +0 -0
- flask_openapi-5.0.0/docs/assets/image-20210605115557426.png +0 -0
- flask_openapi-5.0.0/docs/assets/openapi-all.png +0 -0
- flask_openapi-5.0.0/docs/images/logo-animation.svg +26 -0
- flask_openapi-5.0.0/docs/images/logo-blue.svg +1 -0
- flask_openapi-5.0.0/docs/images/logo-text.gif +0 -0
- flask_openapi-5.0.0/docs/images/logo-text.svg +54 -0
- flask_openapi-5.0.0/docs/images/logo-white.svg +1 -0
- flask_openapi-5.0.0/docs/index.md +2 -0
- flask_openapi-5.0.0/docs/index.zh.md +199 -0
- flask_openapi-5.0.0/examples/api_blueprint_demo.py +64 -0
- flask_openapi-5.0.0/examples/api_view_demo.py +65 -0
- flask_openapi-5.0.0/examples/async_demo.py +49 -0
- flask_openapi-5.0.0/examples/enum_demo.py +26 -0
- flask_openapi-5.0.0/examples/header_demo.py +25 -0
- flask_openapi-5.0.0/examples/image_demo.py +19 -0
- flask_openapi-5.0.0/examples/init_oauth_demo.py +34 -0
- flask_openapi-5.0.0/examples/just_flask.py +12 -0
- flask_openapi-5.0.0/examples/nested_apiblueprint_demo.py +27 -0
- flask_openapi-5.0.0/examples/openapi_extensions.py +22 -0
- flask_openapi-5.0.0/examples/orjson_demo.py +39 -0
- flask_openapi-5.0.0/examples/pydantic_custom_root_types.py +56 -0
- flask_openapi-5.0.0/examples/request_body_demo.py +48 -0
- flask_openapi-5.0.0/examples/response_demo.py +48 -0
- flask_openapi-5.0.0/examples/rest_demo.py +122 -0
- flask_openapi-5.0.0/examples/servers_demo.py +36 -0
- flask_openapi-5.0.0/examples/simple_demo.py +32 -0
- flask_openapi-5.0.0/examples/upload_file_demo.py +36 -0
- flask_openapi-5.0.0/flask_openapi/__init__.py +38 -0
- flask_openapi-5.0.0/flask_openapi/__version__.py +1 -0
- flask_openapi-5.0.0/flask_openapi/blueprint.py +588 -0
- flask_openapi-5.0.0/flask_openapi/commands.py +35 -0
- flask_openapi-5.0.0/flask_openapi/endpoint.py +101 -0
- flask_openapi-5.0.0/flask_openapi/models/__init__.py +85 -0
- flask_openapi-5.0.0/flask_openapi/models/callback.py +15 -0
- flask_openapi-5.0.0/flask_openapi/models/components.py +36 -0
- flask_openapi-5.0.0/flask_openapi/models/contact.py +13 -0
- flask_openapi-5.0.0/flask_openapi/models/data_type.py +15 -0
- flask_openapi-5.0.0/flask_openapi/models/discriminator.py +13 -0
- flask_openapi-5.0.0/flask_openapi/models/encoding.py +26 -0
- flask_openapi-5.0.0/flask_openapi/models/example.py +18 -0
- flask_openapi-5.0.0/flask_openapi/models/external_documentation.py +12 -0
- flask_openapi-5.0.0/flask_openapi/models/file.py +24 -0
- flask_openapi-5.0.0/flask_openapi/models/header.py +13 -0
- flask_openapi-5.0.0/flask_openapi/models/info.py +20 -0
- flask_openapi-5.0.0/flask_openapi/models/license.py +13 -0
- flask_openapi-5.0.0/flask_openapi/models/link.py +20 -0
- flask_openapi-5.0.0/flask_openapi/models/media_type.py +22 -0
- flask_openapi-5.0.0/flask_openapi/models/oauth_flow.py +15 -0
- flask_openapi-5.0.0/flask_openapi/models/oauth_flows.py +17 -0
- flask_openapi-5.0.0/flask_openapi/models/operation.py +34 -0
- flask_openapi-5.0.0/flask_openapi/models/parameter.py +31 -0
- flask_openapi-5.0.0/flask_openapi/models/parameter_in_type.py +11 -0
- flask_openapi-5.0.0/flask_openapi/models/path_item.py +34 -0
- flask_openapi-5.0.0/flask_openapi/models/paths.py +6 -0
- flask_openapi-5.0.0/flask_openapi/models/reference.py +11 -0
- flask_openapi-5.0.0/flask_openapi/models/request_body.py +15 -0
- flask_openapi-5.0.0/flask_openapi/models/response.py +20 -0
- flask_openapi-5.0.0/flask_openapi/models/responses.py +7 -0
- flask_openapi-5.0.0/flask_openapi/models/schema.py +57 -0
- flask_openapi-5.0.0/flask_openapi/models/security_requirement.py +5 -0
- flask_openapi-5.0.0/flask_openapi/models/security_scheme.py +23 -0
- flask_openapi-5.0.0/flask_openapi/models/security_scheme_in_type.py +9 -0
- flask_openapi-5.0.0/flask_openapi/models/server.py +16 -0
- flask_openapi-5.0.0/flask_openapi/models/server_variable.py +13 -0
- flask_openapi-5.0.0/flask_openapi/models/style_values.py +12 -0
- flask_openapi-5.0.0/flask_openapi/models/tag.py +18 -0
- flask_openapi-5.0.0/flask_openapi/models/validation_error.py +17 -0
- flask_openapi-5.0.0/flask_openapi/models/xml.py +16 -0
- flask_openapi-5.0.0/flask_openapi/openapi.py +821 -0
- flask_openapi-5.0.0/flask_openapi/plugins.py +12 -0
- flask_openapi-5.0.0/flask_openapi/py.typed +0 -0
- flask_openapi-5.0.0/flask_openapi/request.py +248 -0
- flask_openapi-5.0.0/flask_openapi/templates.py +108 -0
- flask_openapi-5.0.0/flask_openapi/types.py +21 -0
- flask_openapi-5.0.0/flask_openapi/utils.py +527 -0
- flask_openapi-5.0.0/flask_openapi/view.py +219 -0
- flask_openapi-5.0.0/mkdocs.yml +114 -0
- flask_openapi-5.0.0/pyproject.toml +98 -0
- flask_openapi-5.0.0/tests/config.py +10 -0
- flask_openapi-5.0.0/tests/test_api_blueprint.py +109 -0
- flask_openapi-5.0.0/tests/test_api_view.py +118 -0
- flask_openapi-5.0.0/tests/test_api_view_args.py +58 -0
- flask_openapi-5.0.0/tests/test_async.py +77 -0
- flask_openapi-5.0.0/tests/test_body.py +48 -0
- flask_openapi-5.0.0/tests/test_command.py +29 -0
- flask_openapi-5.0.0/tests/test_cookie.py +53 -0
- flask_openapi-5.0.0/tests/test_form.py +108 -0
- flask_openapi-5.0.0/tests/test_header.py +91 -0
- flask_openapi-5.0.0/tests/test_model_config.py +32 -0
- flask_openapi-5.0.0/tests/test_multi_decorator.py +39 -0
- flask_openapi-5.0.0/tests/test_nested_apiblueprint.py +56 -0
- flask_openapi-5.0.0/tests/test_openapi.py +89 -0
- flask_openapi-5.0.0/tests/test_openapi_extensions.py +61 -0
- flask_openapi-5.0.0/tests/test_openapi_with_doc_prefix.py +22 -0
- flask_openapi-5.0.0/tests/test_options_in_viewfunc.py +62 -0
- flask_openapi-5.0.0/tests/test_path.py +49 -0
- flask_openapi-5.0.0/tests/test_populate_by_name.py +129 -0
- flask_openapi-5.0.0/tests/test_pydantic_calculated_fields.py +36 -0
- flask_openapi-5.0.0/tests/test_pydantic_custom_root_types.py +79 -0
- flask_openapi-5.0.0/tests/test_pydantic_validation_error.py +101 -0
- flask_openapi-5.0.0/tests/test_query.py +85 -0
- flask_openapi-5.0.0/tests/test_request_body.py +78 -0
- flask_openapi-5.0.0/tests/test_response.py +97 -0
- flask_openapi-5.0.0/tests/test_restapi.py +79 -0
- flask_openapi-5.0.0/tests/test_trail_slash.py +59 -0
- flask_openapi-5.0.0/tests/test_url_prefix.py +65 -0
- flask_openapi-5.0.0/tests/test_utils.py +24 -0
- flask_openapi-5.0.0/tests/test_validate_request.py +115 -0
- flask_openapi-5.0.0/tests/test_validate_responses.py +236 -0
- flask_openapi-5.0.0/tests/test_validation_error.py +76 -0
- flask_openapi-5.0.0/uv.lock +1644 -0
|
@@ -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@v7
|
|
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@v7
|
|
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@v11
|
|
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", "3.15" ]
|
|
24
|
+
env:
|
|
25
|
+
PYTHONPATH: .
|
|
26
|
+
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v7
|
|
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
|