mirror of
https://github.com/openai/codex.git
synced 2026-11-10 21:00:47 +00:00
Fix clippy in app-server schema fixture test
Motivation:
- `cargo clippy --tests` is run in CI with `-D clippy::expect-used`; the new schema fixture test used `expect()`.
What changed:
- Convert test helpers to return `anyhow::Result` and add context instead of using `expect()`.
Refs: 3b069fda39 (schema fixture vendoring commit)
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"definitions": {
|
||||
"ThreadTokenUsage": {
|
||||
"properties": {
|
||||
"last": {
|
||||
"$ref": "#/definitions/TokenUsageBreakdown"
|
||||
},
|
||||
"modelContextWindow": {
|
||||
"format": "int64",
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"total": {
|
||||
"$ref": "#/definitions/TokenUsageBreakdown"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"last",
|
||||
"total"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"TokenUsageBreakdown": {
|
||||
"properties": {
|
||||
"cachedInputTokens": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"inputTokens": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"outputTokens": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"reasoningOutputTokens": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"totalTokens": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"cachedInputTokens",
|
||||
"inputTokens",
|
||||
"outputTokens",
|
||||
"reasoningOutputTokens",
|
||||
"totalTokens"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"threadId": {
|
||||
"type": "string"
|
||||
},
|
||||
"tokenUsage": {
|
||||
"$ref": "#/definitions/ThreadTokenUsage"
|
||||
},
|
||||
"turnId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"threadId",
|
||||
"tokenUsage",
|
||||
"turnId"
|
||||
],
|
||||
"title": "ThreadTokenUsageUpdatedNotification",
|
||||
"type": "object"
|
||||
}
|
||||
Reference in New Issue
Block a user