pub struct ResponseSchemaInfo {
pub content_type: String,
pub schema: Value,
pub example: Option<Value>,
}Expand description
Response schema information for successful responses (200/201/204)
This struct provides schema information extracted from OpenAPI response definitions,
enabling AI agents to understand the expected response structure before execution.
§Current Limitations
-
Response references not resolved: If a response is defined as a reference (e.g.,
$ref: '#/components/responses/UserResponse'), the schema will not be extracted. Only inline response definitions are processed. -
Nested schema references not resolved: While top-level schema references (e.g.,
$ref: '#/components/schemas/User') are resolved, nested references within object properties remain as$refobjects in the output. For example:{ "type": "object", "properties": { "user": { "$ref": "#/components/schemas/User" } // Not resolved } }
Fields§
§content_type: StringContent type (e.g., “application/json”)
schema: ValueJSON Schema representation of the response body
Note: This schema may contain unresolved $ref objects for nested references.
Only the top-level schema reference is resolved.
example: Option<Value>Example response if available from the spec
Trait Implementations§
Source§impl Clone for ResponseSchemaInfo
impl Clone for ResponseSchemaInfo
Source§fn clone(&self) -> ResponseSchemaInfo
fn clone(&self) -> ResponseSchemaInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more