We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bfe1809 commit b5fcb10Copy full SHA for b5fcb10
xdk-openapi/src/reference.rs
@@ -79,13 +79,13 @@ impl<T: Clone + Serialize + Any> Serialize for RefOrValue<T> {
79
// First serialize the resolved value to a serde_json::Value
80
let resolved_json = serde_json::to_value(resolved.as_ref())
81
.map_err(serde::ser::Error::custom)?;
82
-
+
83
if let serde_json::Value::Object(mut obj) = resolved_json {
84
// Add the $ref path to the object so templates can still extract type names
85
obj.insert("$ref".to_string(), serde_json::Value::String(path.clone()));
86
return obj.serialize(serializer);
87
}
88
89
// If not an object, just serialize the resolved value
90
resolved.serialize(serializer)
91
} else {
0 commit comments