Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
python: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14', 'pypy-3.11']
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,6 @@ dmypy.json

# Pyre type checker
.pyre/

mise.toml
requirements*.txt
12 changes: 6 additions & 6 deletions examples/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ class UserSchema(ma.Schema):
class Meta:
description = 'This schema represents a user'

id = ma.String(dump_only=True, description="The user's id")
username = ma.String(required=True, description="The user's username")
first_name = ma.String(description="The user's first name")
last_name = ma.String(description="The user's last name")
age = ma.Integer(description="The user's age")
password = ma.String(load_only=True, description="The user's password")
id = ma.String(dump_only=True, metadata={"description": "The user's id"})
username = ma.String(required=True, metadata={"description": "The user's username"})
first_name = ma.String(metadata={"description": "The user's first name"})
last_name = ma.String(metadata={"description": "The user's last name"})
age = ma.Integer(metadata={"description": "The user's age"})
password = ma.String(load_only=True, metadata={"description": "The user's password"})


@app.get('/users')
Expand Down
12 changes: 6 additions & 6 deletions examples/app_with_class_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ class UserSchema(ma.Schema):
class Meta:
description = 'This schema represents a user'

id = ma.String(dump_only=True, description="The user's id")
username = ma.String(required=True, description="The user's username")
first_name = ma.String(description="The user's first name")
last_name = ma.String(description="The user's last name")
age = ma.Integer(description="The user's age")
password = ma.String(load_only=True, description="The user's password")
id = ma.String(dump_only=True, metadata={"description": "The user's id"})
username = ma.String(required=True, metadata={"description": "The user's username"})
first_name = ma.String(metadata={"description": "The user's first name"})
last_name = ma.String(metadata={"description": "The user's last name"})
age = ma.Integer(metadata={"description": "The user's age"})
password = ma.String(load_only=True, metadata={"description": "The user's password"})


class GetUsersEndpoint(MethodView):
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
requires-python = ">=3.6"
requires-python = ">=3.9"
dependencies = [
"flask >= 1.1.0",
"flask-marshmallow",
Expand All @@ -32,6 +32,9 @@ Homepage = "https://github.com/miguelgrinberg/apifairy"
docs = [
"sphinx",
]
dev = [
"tox",
]

[tool.setuptools]
zip-safe = false
Expand Down
8 changes: 4 additions & 4 deletions tests/test_apifairy.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@ class Schema(ma.Schema):
class Meta:
unknown = EXCLUDE

id = ma.Integer(default=123)
id = ma.Integer(dump_default=123)
name = ma.Str(required=True)


class Schema2(ma.Schema):
class Meta:
unknown = EXCLUDE

id2 = ma.Integer(default=123)
id2 = ma.Integer(dump_default=123)
name2 = ma.Str(required=True)


class FooSchema(ma.Schema):
id = ma.Integer(default=123)
id = ma.Integer(dump_default=123)
name = ma.Str()


class QuerySchema(ma.Schema):
id = ma.Integer(missing=1)
id = ma.Integer(load_default=1)


class FormSchema(ma.Schema):
Expand Down
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
[tox]
envlist=flake8,py38,py39,py310,py311,py312,pypy3,docs
envlist=flake8,py39,py310,py311,py312,py313,py314,pypy3,docs
skip_missing_interpreters=True

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py313
3.14: py314
pypy-3: pypy3

[testenv]
Expand Down