Commit dd6a0c60 authored by ozzeh's avatar ozzeh
Browse files

Add ability to reflect strings with a 'date-time' format

parent befb344f
from typing import Optional, List
from datetime import datetime
from pydantic import BaseModel, create_model, Field, PrivateAttr
from devtools import debug
from jsonpointer import resolve_pointer
......@@ -66,6 +68,9 @@ class SchemaReflector:
type_ = property_info.get("type")
if type_ == "string":
if "format" in property_info and property_info["format"] == "date-time":
return (datetime, ... if required else None)
return (str, ... if required else None)
elif type_ == "boolean":
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment