Skip to content

Commit fc327af

Browse files
committed
update example with pydantic 2.10.5 semantic_version type
1 parent 802c070 commit fc327af

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

docs/advanced/combine-pydantic-and-semver.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,15 @@ According to its homepage, `Pydantic <https://pydantic-docs.helpmanual.io>`_
99
"enforces type hints at runtime, and provides user friendly errors when data
1010
is invalid."
1111

12-
If you are working with Pydantic>2.0 and pydantic-extra-types>=2.10.0 use the built in `_VersionPydanticAnnotation` type, which wraps the :class:`Version <semver.version.Version>` class.
12+
If you are working with Pydantic>2.0 and pydantic-extra-types>=2.10.5 use the built in `SemanticVersion` type, which wraps the :class:`Version <semver.version.Version>` class.
1313

1414
.. code-block:: python
1515
1616
from pydantic import BaseModel
17-
18-
from pydantic_extra_types.server import _VersionPydanticAnnotation
17+
from pydantic_extra_types.semantic_version import SemanticVersion
1918
2019
class appVersion(BaseModel):
21-
version: _VersionPydanticAnnotation
20+
version: SemanticVersion
2221
2322
app_version = appVersion(version="1.2.3")
2423

0 commit comments

Comments
 (0)