codex: preserve nested schema descriptions in tests (#18159)

This commit is contained in:
Soheil Norouzi
2026-04-16 17:12:31 -04:00
parent 0a8919893f
commit a10e034295
2 changed files with 20 additions and 8 deletions

View File

@@ -46,8 +46,14 @@ fn parse_tool_input_schema_keeps_local_ref_objects_inside_structured_outputs_sub
"date_time_zone": {
"type": "object",
"properties": {
"dateTime": { "type": "string" },
"timeZone": { "type": "string" }
"dateTime": {
"type": "string",
"description": "RFC3339 timestamp"
},
"timeZone": {
"type": "string",
"description": "IANA time zone"
}
},
"required": ["dateTime", "timeZone"],
"additionalProperties": false
@@ -67,11 +73,11 @@ fn parse_tool_input_schema_keeps_local_ref_objects_inside_structured_outputs_sub
BTreeMap::from([
(
"dateTime".to_string(),
JsonSchema::string(/*description*/ None),
JsonSchema::string(Some("RFC3339 timestamp".to_string())),
),
(
"timeZone".to_string(),
JsonSchema::string(/*description*/ None),
JsonSchema::string(Some("IANA time zone".to_string())),
),
]),
Some(vec!["dateTime".to_string(), "timeZone".to_string()]),

View File

@@ -463,8 +463,14 @@ fn parse_tool_input_schema_resolves_local_ref_objects() {
"date_time_zone": {
"type": "object",
"properties": {
"dateTime": { "type": "string" },
"timeZone": { "type": "string" }
"dateTime": {
"type": "string",
"description": "RFC3339 timestamp"
},
"timeZone": {
"type": "string",
"description": "IANA time zone"
}
},
"required": ["dateTime", "timeZone"]
}
@@ -481,11 +487,11 @@ fn parse_tool_input_schema_resolves_local_ref_objects() {
BTreeMap::from([
(
"dateTime".to_string(),
JsonSchema::string(/*description*/ None),
JsonSchema::string(Some("RFC3339 timestamp".to_string())),
),
(
"timeZone".to_string(),
JsonSchema::string(/*description*/ None),
JsonSchema::string(Some("IANA time zone".to_string())),
),
]),
Some(vec!["dateTime".to_string(), "timeZone".to_string()]),