1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
"""Dict input schemas for testing generate() with dict input."""
from __future__ import annotations
jsonschema_dict: dict[str, object] = {
"type": "object",
"properties": {
"name": {"type": "string"},
"age": {"type": "integer"},
},
"required": ["name"],
}
openapi_dict: dict[str, object] = {
"openapi": "3.0.0",
"info": {"title": "Test API", "version": "1.0.0"},
"paths": {},
"components": {
"schemas": {
"User": {
"type": "object",
"properties": {
"id": {"type": "integer"},
"name": {"type": "string"},
},
}
}
},
}
auto_error_dict: dict[str, object] = {
"type": "object",
"properties": {"foo": {"type": "string"}},
}
graphql_error_dict: dict[str, object] = {
"type": "object",
"properties": {"bar": {"type": "string"}},
}
|