Add json_schema as an alias for JSON Grammar

This commit is contained in:
Sidharth Rajaram 2024-10-22 19:08:32 -07:00 committed by GitHub
parent 9c9ef37c56
commit a1803bb780
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -120,7 +120,7 @@ pub(crate) enum GrammarType {
/// JSON Schema is a declarative language that allows to annotate JSON documents
/// with types and descriptions.
#[serde(rename = "json")]
#[serde(alias = "json_object")]
#[serde(alias = "json_object", alias = "json_schema")]
#[schema(example = json ! ({"properties": {"location":{"type": "string"}}}))]
Json(serde_json::Value),
#[serde(rename = "regex")]