Open shuttle1987 opened 5 years ago
Had to re-read the typing docs myself. I find the two following references:
You can use Optional[X] as a shorthand for Union[X, None].
Optional[X] is equivalent to Union[X, None]
So it seems both are acceptable. If the schema module doesn't currently support this, that's a bug.
Did either of these work as you expected ? If so, please close this issue. If not, please provide more details :)
Let's say we have a page that could contain
socialURL
but this may not be present always, how should we go about marking this?Is one of these is preferable to the other?