From 67a696fad9a7ce292429d53ae68cf706cef3cd8c Mon Sep 17 00:00:00 2001 From: Alex Weston Date: Thu, 30 Jan 2025 14:03:54 -0500 Subject: [PATCH] Add json_schema alias for GrammarType --- router/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/router/src/lib.rs b/router/src/lib.rs index 414d38ed..1e5ff170 100644 --- a/router/src/lib.rs +++ b/router/src/lib.rs @@ -209,7 +209,8 @@ pub(crate) enum GrammarType { /// /// JSON Schema is a declarative language that allows to annotate JSON documents /// with types and descriptions. - #[serde(rename = "json")] + #[serde(rename = "json_schema")] + #[serde(alias = "json")] #[serde(alias = "json_object")] #[schema(example = json ! ({"properties": {"location":{"type": "string"}}}))] Json(serde_json::Value),