From c0d6f15baf7b802d95af799c0db3375878e9cfe3 Mon Sep 17 00:00:00 2001 From: Fredrik Enestad Date: Mon, 20 Jan 2025 16:49:32 +0100 Subject: [PATCH] if there is dynamic segments in the path, there is parseable data --- runtimes/core/src/api/schema/encoding.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/runtimes/core/src/api/schema/encoding.rs b/runtimes/core/src/api/schema/encoding.rs index 0e40699dd9..ebefc69de5 100644 --- a/runtimes/core/src/api/schema/encoding.rs +++ b/runtimes/core/src/api/schema/encoding.rs @@ -405,8 +405,18 @@ pub fn handshake_encoding( let rpc_path = rpc.path.as_ref().unwrap_or(&default_path); let Some(handshake_schema) = &rpc.handshake_schema else { + let parse_data = rpc + .path + .as_ref() + .map(|path| { + path.segments + .iter() + .any(|segment| segment.r#type() != SegmentType::Literal) + }) + .unwrap_or(false); + return Ok(Some(HandshakeSchemaUnderConstruction { - parse_data: false, + parse_data, schema: SchemaUnderConstruction { combined: None, body: None,