Skip to content

Commit

Permalink
if there is dynamic segments in the path, there is parseable data
Browse files Browse the repository at this point in the history
  • Loading branch information
fredr committed Jan 22, 2025
1 parent 136727f commit c0d6f15
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion runtimes/core/src/api/schema/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c0d6f15

Please sign in to comment.