Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAS-134197 / 25.10 / Set extra="ignore" for CoreSetOptionsOptions #15695

Merged
merged 2 commits into from
Feb 13, 2025
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
1 change: 1 addition & 0 deletions src/middlewared/middlewared/api/v25_04_0/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class CoreSetOptionsOptions(BaseModel, metaclass=ForUpdateMetaclass):
strict=True,
str_max_length=1024,
use_attribute_docstrings=True,
extra="ignore",
)

private_methods: bool
Expand Down
10 changes: 10 additions & 0 deletions src/middlewared/middlewared/api/v25_10_0/core.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from typing import Literal

from pydantic import ConfigDict

from middlewared.api.base import BaseModel, ForUpdateMetaclass, single_argument_result

__all__ = [
Expand All @@ -23,6 +25,14 @@ class CorePingResult(BaseModel):


class CoreSetOptionsOptions(BaseModel, metaclass=ForUpdateMetaclass):
# We can't use `extra="forbid"` here because newer version clients might try to set more options than we support
model_config = ConfigDict(
strict=True,
str_max_length=1024,
use_attribute_docstrings=True,
extra="ignore",
)

private_methods: bool
py_exceptions: bool

Expand Down