From 295832aa5794cbeb78aa7dedc267a657df3bebb5 Mon Sep 17 00:00:00 2001 From: Pedro Crespo-Valero <32402063+pcrespov@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:35:31 +0100 Subject: [PATCH] missing config --- packages/models-library/src/models_library/rest_base.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/models-library/src/models_library/rest_base.py b/packages/models-library/src/models_library/rest_base.py index a6b24ef6382..797d8876680 100644 --- a/packages/models-library/src/models_library/rest_base.py +++ b/packages/models-library/src/models_library/rest_base.py @@ -1,4 +1,4 @@ -from pydantic import BaseModel, Extra +from pydantic import BaseModel, ConfigDict class RequestParameters(BaseModel): @@ -15,5 +15,4 @@ def as_params(self, **export_options) -> dict[str, str]: class StrictRequestParameters(RequestParameters): """Use a base class for context, path and query parameters""" - class Config: - extra = Extra.forbid # strict + model_config = ConfigDict(extra="forbid")