According to json-schema.org, it is best practice to include the $id field with objects.
I'm struggling with how to get this at the top level, for example;
class MySchema(BaseModel):
id: str = Field(default="http://my_url/my_schema.json", alias="$id")
if __name__ == '__main__':
pprint(MySchema.schema())
yields
{'properties': {'$id': {'default': 'http://my_url/my_schema.json',
'title': '$Id',
'type': 'string'}},
'title': 'MySchema',
'type': 'object'}
How do I get $id at the top level, with title and type, not as a nested property?