Skip to content

Commit 949c948

Browse files
committed
revert pydantic
1 parent ee370fb commit 949c948

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

pygeoapi/models/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
class APIRules(BaseModel):
3838
""" Pydantic model for API design rules that must be adhered to. """
39-
api_version: str = Field(regex=r'^\d+\.\d+\..+$',
39+
api_version: str = Field(pattern=r'^\d+\.\d+\..+$',
4040
description="Semantic API version number.")
4141
url_prefix: str = Field(
4242
"",

pygeoapi/models/openapi.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@
3131

3232
from enum import Enum
3333

34-
from pydantic import BaseModel
34+
from pydantic import RootModel
3535

3636

3737
class SupportedFormats(Enum):
3838
JSON = "json"
3939
YAML = "yaml"
4040

4141

42-
class OAPIFormat(BaseModel):
43-
__root__: SupportedFormats = SupportedFormats.YAML
42+
class OAPIFormat(RootModel):
43+
root: SupportedFormats = SupportedFormats.YAML

requirements-dev.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ starlette
1313
uvicorn[standard]
1414
httpx
1515

16-
# Pydantic/Dataclasses models
17-
polyfactory
18-
1916
# PEP8
2017
flake8
2118

requirements-django.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Django
2-
pydantic<2.0
2+
pydantic

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ filelock
44
Flask
55
jinja2
66
jsonschema
7-
pydantic<2.0
7+
pydantic
88
pygeofilter
99
pygeoif
1010
pyproj

0 commit comments

Comments
 (0)