diff --git a/tests/roots/test-base/target/configuration.py b/tests/roots/test-base/target/configuration.py index ca8c760..05754fb 100644 --- a/tests/roots/test-base/target/configuration.py +++ b/tests/roots/test-base/target/configuration.py @@ -316,14 +316,6 @@ def settings_customise_sources( return env_settings, init_settings, file_secret_settings -class ConfigMembers(BaseModel): - """ConfigUndocMembers.""" - - class Config: - frozen = False - title = 'FooBar' - - class ConfigSignaturePrefix(BaseModel): """ConfigSignaturePrefix.""" @@ -482,7 +474,7 @@ class FieldShowConstraintsNativeConstraintTypes(BaseModel): class FieldShowConstraintsIgnoreExtraKwargs(BaseModel): """FieldShowConstraints.""" - field: int = Field(1, ge=0, le=100, non_existing_kwarg=1) + field: int = Field(1, ge=0, le=100, json_schema_extra=dict(on_existing_kwarg=1)) """Field.""" diff --git a/tests/roots/test-base/target/example_setting.py b/tests/roots/test-base/target/example_setting.py index 39f87a5..2d217f9 100644 --- a/tests/roots/test-base/target/example_setting.py +++ b/tests/roots/test-base/target/example_setting.py @@ -14,7 +14,7 @@ class ExampleSettings(BaseSettings): field_plain_with_validator: int = 100 """Show standard field with type annotation.""" - field_with_validator_and_alias: str = Field('FooBar', alias='BarFoo', env='BarFoo') + field_with_validator_and_alias: str = Field('FooBar', alias='BarFoo') """Shows corresponding validator with link/anchor.""" field_with_constraints_and_description: int = Field( diff --git a/tests/roots/test-base/target/usage_automodule.py b/tests/roots/test-base/target/usage_automodule.py index 7f9485d..015fadf 100644 --- a/tests/roots/test-base/target/usage_automodule.py +++ b/tests/roots/test-base/target/usage_automodule.py @@ -14,7 +14,7 @@ class AutoModuleSettings(BaseSettings): field_plain_with_validator: int = 100 """Show standard field with type annotation.""" - field_with_validator_and_alias: str = Field('FooBar', alias='BarFoo', env='BarFoo') + field_with_validator_and_alias: str = Field('FooBar', alias='BarFoo') """Shows corresponding validator with link/anchor.""" field_with_constraints_and_description: int = Field( diff --git a/tests/roots/test-base/target/usage_setting.py b/tests/roots/test-base/target/usage_setting.py index 39f87a5..2d217f9 100644 --- a/tests/roots/test-base/target/usage_setting.py +++ b/tests/roots/test-base/target/usage_setting.py @@ -14,7 +14,7 @@ class ExampleSettings(BaseSettings): field_plain_with_validator: int = 100 """Show standard field with type annotation.""" - field_with_validator_and_alias: str = Field('FooBar', alias='BarFoo', env='BarFoo') + field_with_validator_and_alias: str = Field('FooBar', alias='BarFoo') """Shows corresponding validator with link/anchor.""" field_with_constraints_and_description: int = Field( diff --git a/tests/test_inspection.py b/tests/test_inspection.py index 76a9118..4d0c54c 100644 --- a/tests/test_inspection.py +++ b/tests/test_inspection.py @@ -134,6 +134,7 @@ def test_get_safe_schema_json_serializable(serializable): assert 'field_one' in json_result['properties'] +@pytest.mark.filterwarnings('ignore::pydantic.json_schema.PydanticJsonSchemaWarning') def test_get_safe_schema_json_non_serializable(serializable_mix): json_result = serializable_mix.schema.sanitized invalid_fields = serializable_mix.fields.non_json_serializable