Pydantic datetime yields Invalid Schema

@gravityanalytica this is similar to this thread. I’ll paste the same answer here :slight_smile:

This is correct behaviour. According to the docs only the following types are supported:

  • String
  • Number
  • Boolean
  • Object
  • Array
  • Enum
  • anyOf

This is in line with JSON data type support, which doesn’t have support for datetime.

So the idea then is to use a String :slight_smile:

1 Like