def test_model_default():
    """Make sure inner model types are encoded properly"""

    class Inner(BaseModel):
        a: dict[Path, str] = {Path(): ''}

    class Outer(BaseModel):
        inner: Inner = Inner()

    assert Outer.model_json_schema() == {
        '$defs': {
            'Inner': {
                'properties': {
                    'a': {
                        'additionalProperties': {'type': 'string'},
                        'default': {'.': ''},
                        'propertyNames': {'format': 'path'},
                        'title': 'A',
                        'type': 'object',
                    }
                },
                'title': 'Inner',
                'type': 'object',
            }
        },
        'properties': {'inner': {'$ref': '#/$defs/Inner', 'default': {'a': {'.': ''}}}},
        'title': 'Outer',
        'type': 'object',
    }
Make sure inner model types are encoded properly
tests/test_json_schema.py