diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ff37fd5e..c18f12d1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,9 +3,9 @@ repos: rev: v3.15.0 hooks: - id: pyupgrade - args: [--py37-plus] + args: [--py38-plus] - repo: https://github.com/psf/black - rev: 23.10.1 + rev: 23.12.1 hooks: - id: black language_version: python3 @@ -18,7 +18,7 @@ repos: rev: 1.16.0 hooks: - id: blacken-docs - additional_dependencies: [black==22.3.0] + additional_dependencies: [black==23.12.1] - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.8.0 hooks: diff --git a/README.rst b/README.rst index 52f70c87..3b18555c 100644 --- a/README.rst +++ b/README.rst @@ -67,6 +67,7 @@ Example Application plugins=[FlaskPlugin(), MarshmallowPlugin()], ) + # Optional marshmallow support class CategorySchema(Schema): id = fields.Int() diff --git a/docs/index.rst b/docs/index.rst index cd068515..55c83b85 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -36,6 +36,7 @@ Example Application plugins=[FlaskPlugin(), MarshmallowPlugin()], ) + # Optional marshmallow support class CategorySchema(Schema): id = fields.Int() diff --git a/docs/using_plugins.rst b/docs/using_plugins.rst index 8dd2b4bc..369fa227 100644 --- a/docs/using_plugins.rst +++ b/docs/using_plugins.rst @@ -113,6 +113,7 @@ We'll add some YAML in the docstring to add response information. app = Flask(__name__) + # NOTE: Plugins may inspect docstrings to gather more information for the spec @app.route("/gists/") def gist_detail(gist_id): @@ -258,6 +259,7 @@ OpenAPI type and format, or a marshmallow `Field` that has the desired target ma title="Demo", version="0.1", openapi_version="3.0.0", plugins=(ma_plugin,) ) + # Inherits Integer mapping of ('integer', None) class CustomInteger(Integer): pass