Skip to content

Commit 4249355

Browse files
committed
Exclude ItemStack._data from JSON Schema
1 parent b51f78d commit 4249355

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hexdoc/core/resource.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from pydantic.config import JsonDict
2929
from pydantic.dataclasses import dataclass
3030
from pydantic.functional_validators import ModelWrapValidatorHandler
31+
from pydantic.json_schema import SkipJsonSchema
3132
from typing_extensions import override
3233

3334
from hexdoc.model import DEFAULT_CONFIG
@@ -263,7 +264,7 @@ class ItemStack(BaseResourceLocation, regex=_make_regex(count=True, nbt=True)):
263264
count: int | None = None
264265
nbt: str | None = None
265266

266-
_data: Compound | None = None
267+
_data: SkipJsonSchema[Compound | None] = None
267268

268269
def __init_subclass__(cls, **kwargs: Any):
269270
super().__init_subclass__(regex=cls._from_str_regex, **kwargs)

0 commit comments

Comments
 (0)