Skip to content

Commit

Permalink
Fix link to API documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Kludex committed Jul 26, 2023
1 parent 0ce9baf commit 6de1425
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/integrations/plugins.md
Expand Up @@ -37,8 +37,8 @@ Pydantic has an API for creating plugins. The API is exposed via the `pydantic.p

On your plugin you can _wrap_ the following methods:

* [`validate_python`][pydantic_core._pydantic_core.SchemaValidator.validate_python]: Used to validate the data from a Python object.
* [`validate_json`][pydantic_core._pydantic_core.SchemaValidator.validate_json]: Used to validate the data from a JSON string.
* [`validate_python`][pydantic_core.SchemaValidator.validate_python]: Used to validate the data from a Python object.
* [`validate_json`][pydantic_core.SchemaValidator.validate_json]: Used to validate the data from a JSON string.

For each method, you can implement the following callbacks:

Expand All @@ -50,7 +50,7 @@ Let's see an example of a plugin that _wraps_ the `validate_python` method of th

```py
from pprint import pprint
from typing import Any
from typing import Any, Optional, Dict

from pydantic_core import ValidationError

Expand All @@ -63,10 +63,10 @@ class OnValidatePython(_OnValidatePython):
self,
input: Any,
*,
strict: bool | None = None,
from_attributes: bool | None = None,
context: dict[str, Any] | None = None,
self_instance: Any | None = None,
strict: Optional[bool] = None,
from_attributes: Optional[bool] = None,
context: Optional[Dict[str, Any]] = None,
self_instance: Optional[Any] = None,
) -> None:
pprint(input)

Expand Down

0 comments on commit 6de1425

Please sign in to comment.