from types import ModuleType
import pytest
-from dirty_equals import IsDict
from fastapi.testclient import TestClient
from sqlmodel import create_engine
from sqlmodel.pool import StaticPool
"properties": {
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
},
},
"HeroPublic": {
"properties": {
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
"id": {"title": "Id", "type": "integer"},
},
},
"title": "HeroUpdate",
"type": "object",
"properties": {
- "name": IsDict(
- {
- "title": "Name",
- "anyOf": [{"type": "string"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Name", "type": "string"}
- ),
- "secret_name": IsDict(
- {
- "title": "Secret Name",
- "anyOf": [{"type": "string"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Secret Name", "type": "string"}
- ),
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
+ "name": {
+ "title": "Name",
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ },
+ "secret_name": {
+ "title": "Secret Name",
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ },
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
},
},
"ValidationError": {
from types import ModuleType
import pytest
-from dirty_equals import IsDict
from fastapi.testclient import TestClient
from sqlmodel import create_engine
from sqlmodel.pool import StaticPool
"properties": {
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
},
},
"HeroPublic": {
"properties": {
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
"id": {"title": "Id", "type": "integer"},
},
},
from types import ModuleType
import pytest
-from dirty_equals import IsDict
from fastapi.testclient import TestClient
from sqlalchemy import inspect
from sqlalchemy.engine.reflection import Inspector
"properties": {
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
},
},
"HeroPublic": {
"id": {"title": "Id", "type": "integer"},
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
},
},
"ValidationError": {
from types import ModuleType
import pytest
-from dirty_equals import IsDict
from fastapi.testclient import TestClient
from sqlalchemy import inspect
from sqlalchemy.engine.reflection import Inspector
"properties": {
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
},
},
"HeroPublic": {
"properties": {
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
"id": {"title": "Id", "type": "integer"},
},
},
from types import ModuleType
import pytest
-from dirty_equals import IsDict
from fastapi.testclient import TestClient
from sqlmodel import create_engine
from sqlmodel.pool import StaticPool
"properties": {
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
},
},
"HeroPublic": {
"properties": {
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
"id": {"title": "Id", "type": "integer"},
},
},
from types import ModuleType
import pytest
-from dirty_equals import IsDict
from fastapi.testclient import TestClient
from sqlmodel import create_engine
from sqlmodel.pool import StaticPool
"properties": {
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
- "team_id": IsDict(
- {
- "title": "Team Id",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Team Id", "type": "integer"}
- ),
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
+ "team_id": {
+ "title": "Team Id",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
},
},
"HeroPublic": {
"properties": {
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
- "team_id": IsDict(
- {
- "title": "Team Id",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Team Id", "type": "integer"}
- ),
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
+ "team_id": {
+ "title": "Team Id",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
"id": {"title": "Id", "type": "integer"},
},
},
"properties": {
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
- "team_id": IsDict(
- {
- "title": "Team Id",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Team Id", "type": "integer"}
- ),
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
+ "team_id": {
+ "title": "Team Id",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
"id": {"title": "Id", "type": "integer"},
- "team": IsDict(
- {
- "anyOf": [
- {"$ref": "#/components/schemas/TeamPublic"},
- {"type": "null"},
- ]
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"$ref": "#/components/schemas/TeamPublic"}
- ),
+ "team": {
+ "anyOf": [
+ {"$ref": "#/components/schemas/TeamPublic"},
+ {"type": "null"},
+ ]
+ },
},
},
"HeroUpdate": {
"title": "HeroUpdate",
"type": "object",
"properties": {
- "name": IsDict(
- {
- "title": "Name",
- "anyOf": [{"type": "string"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Name", "type": "string"}
- ),
- "secret_name": IsDict(
- {
- "title": "Secret Name",
- "anyOf": [{"type": "string"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Secret Name", "type": "string"}
- ),
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
- "team_id": IsDict(
- {
- "title": "Team Id",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Team Id", "type": "integer"}
- ),
+ "name": {
+ "title": "Name",
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ },
+ "secret_name": {
+ "title": "Secret Name",
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ },
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
+ "team_id": {
+ "title": "Team Id",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
},
},
"TeamCreate": {
"title": "TeamUpdate",
"type": "object",
"properties": {
- "id": IsDict(
- {
- "title": "Id",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Id", "type": "integer"}
- ),
- "name": IsDict(
- {
- "title": "Name",
- "anyOf": [{"type": "string"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Name", "type": "string"}
- ),
- "headquarters": IsDict(
- {
- "title": "Headquarters",
- "anyOf": [{"type": "string"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Headquarters", "type": "string"}
- ),
+ "id": {
+ "title": "Id",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
+ "name": {
+ "title": "Name",
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ },
+ "headquarters": {
+ "title": "Headquarters",
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ },
},
},
"ValidationError": {
from types import ModuleType
import pytest
-from dirty_equals import IsDict
from fastapi.testclient import TestClient
from sqlmodel import create_engine
from sqlmodel.pool import StaticPool
"required": ["name", "secret_name"],
"type": "object",
"properties": {
- "id": IsDict(
- {
- "title": "Id",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Id", "type": "integer"}
- ),
+ "id": {
+ "title": "Id",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
},
},
"ValidationError": {
from types import ModuleType
import pytest
-from dirty_equals import IsDict
from fastapi.testclient import TestClient
from sqlmodel import create_engine
from sqlmodel.pool import StaticPool
"properties": {
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
},
},
"HeroPublic": {
"properties": {
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
"id": {"title": "Id", "type": "integer"},
},
},
"title": "HeroUpdate",
"type": "object",
"properties": {
- "name": IsDict(
- {
- "title": "Name",
- "anyOf": [{"type": "string"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Name", "type": "string"}
- ),
- "secret_name": IsDict(
- {
- "title": "Secret Name",
- "anyOf": [{"type": "string"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Secret Name", "type": "string"}
- ),
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
+ "name": {
+ "title": "Name",
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ },
+ "secret_name": {
+ "title": "Secret Name",
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ },
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
},
},
"ValidationError": {
from types import ModuleType
import pytest
-from dirty_equals import IsDict
from fastapi.testclient import TestClient
from sqlmodel import create_engine
from sqlmodel.pool import StaticPool
"required": ["name", "secret_name"],
"type": "object",
"properties": {
- "id": IsDict(
- {
- "title": "Id",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Id", "type": "integer"}
- ),
+ "id": {
+ "title": "Id",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
},
},
"ValidationError": {
from types import ModuleType
import pytest
-from dirty_equals import IsDict
from fastapi.testclient import TestClient
from sqlmodel import create_engine
from sqlmodel.pool import StaticPool
"properties": {
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
- "team_id": IsDict(
- {
- "title": "Team Id",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Team Id", "type": "integer"}
- ),
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
+ "team_id": {
+ "title": "Team Id",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
},
},
"HeroPublic": {
"properties": {
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
- "team_id": IsDict(
- {
- "title": "Team Id",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Team Id", "type": "integer"}
- ),
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
+ "team_id": {
+ "title": "Team Id",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
"id": {"title": "Id", "type": "integer"},
},
},
"title": "HeroUpdate",
"type": "object",
"properties": {
- "name": IsDict(
- {
- "title": "Name",
- "anyOf": [{"type": "string"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Name", "type": "string"}
- ),
- "secret_name": IsDict(
- {
- "title": "Secret Name",
- "anyOf": [{"type": "string"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Secret Name", "type": "string"}
- ),
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
- "team_id": IsDict(
- {
- "title": "Team Id",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Team Id", "type": "integer"}
- ),
+ "name": {
+ "title": "Name",
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ },
+ "secret_name": {
+ "title": "Secret Name",
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ },
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
+ "team_id": {
+ "title": "Team Id",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
},
},
"TeamCreate": {
"title": "TeamUpdate",
"type": "object",
"properties": {
- "name": IsDict(
- {
- "title": "Name",
- "anyOf": [{"type": "string"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Name", "type": "string"}
- ),
- "headquarters": IsDict(
- {
- "title": "Headquarters",
- "anyOf": [{"type": "string"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Headquarters", "type": "string"}
- ),
+ "name": {
+ "title": "Name",
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ },
+ "headquarters": {
+ "title": "Headquarters",
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ },
},
},
"ValidationError": {
from types import ModuleType
import pytest
-from dirty_equals import IsDict
from fastapi.testclient import TestClient
from sqlmodel import create_engine
from sqlmodel.pool import StaticPool
"properties": {
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
},
},
"HeroPublic": {
"properties": {
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
"id": {"title": "Id", "type": "integer"},
},
},
"title": "HeroUpdate",
"type": "object",
"properties": {
- "name": IsDict(
- {
- "title": "Name",
- "anyOf": [{"type": "string"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Name", "type": "string"}
- ),
- "secret_name": IsDict(
- {
- "title": "Secret Name",
- "anyOf": [{"type": "string"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Secret Name", "type": "string"}
- ),
- "age": IsDict(
- {
- "title": "Age",
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- }
- )
- | IsDict(
- # TODO: remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
+ "name": {
+ "title": "Name",
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ },
+ "secret_name": {
+ "title": "Secret Name",
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ },
+ "age": {
+ "title": "Age",
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ },
},
},
"ValidationError": {
from types import ModuleType
import pytest
-from dirty_equals import IsDict
from fastapi.testclient import TestClient
from sqlmodel import Session, create_engine
from sqlmodel.pool import StaticPool
"properties": {
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- "title": "Age",
- }
- )
- | IsDict(
- # TODO: Remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
+ "age": {
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ "title": "Age",
+ },
"password": {"type": "string", "title": "Password"},
},
},
"properties": {
"name": {"title": "Name", "type": "string"},
"secret_name": {"title": "Secret Name", "type": "string"},
- "age": IsDict(
- {
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- "title": "Age",
- }
- )
- | IsDict(
- # TODO: Remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
+ "age": {
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ "title": "Age",
+ },
"id": {"title": "Id", "type": "integer"},
},
},
"title": "HeroUpdate",
"type": "object",
"properties": {
- "name": IsDict(
- {
- "anyOf": [{"type": "string"}, {"type": "null"}],
- "title": "Name",
- }
- )
- | IsDict(
- # TODO: Remove when deprecating Pydantic v1
- {"title": "Name", "type": "string"}
- ),
- "secret_name": IsDict(
- {
- "anyOf": [{"type": "string"}, {"type": "null"}],
- "title": "Secret Name",
- }
- )
- | IsDict(
- # TODO: Remove when deprecating Pydantic v1
- {"title": "Secret Name", "type": "string"}
- ),
- "age": IsDict(
- {
- "anyOf": [{"type": "integer"}, {"type": "null"}],
- "title": "Age",
- }
- )
- | IsDict(
- # TODO: Remove when deprecating Pydantic v1
- {"title": "Age", "type": "integer"}
- ),
- "password": IsDict(
- {
- "anyOf": [{"type": "string"}, {"type": "null"}],
- "title": "Password",
- }
- )
- | IsDict(
- # TODO: Remove when deprecating Pydantic v1
- {"title": "Password", "type": "string"}
- ),
+ "name": {
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ "title": "Name",
+ },
+ "secret_name": {
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ "title": "Secret Name",
+ },
+ "age": {
+ "anyOf": [{"type": "integer"}, {"type": "null"}],
+ "title": "Age",
+ },
+ "password": {
+ "anyOf": [{"type": "string"}, {"type": "null"}],
+ "title": "Password",
+ },
},
},
"ValidationError": {