Feature Request
The path extractor currently only supports greedy extraction of the entire wildcard path value into a String value. It should also support Vec<T> and handle the value extraction and parsing to T.
Though I personally only need support for Vec<String> :)
Motivation
Currently wildcard values are generally deserialized into a String and the user has to handle value extraction.
For a project I would like to implement nested groups/namespaces, which requires using wildcards. This would require me to handle extracting the path values into a Vec<String> before I can run logic for the strings.
I don't see why axum's Path extractor shouldn't support Vec<String>, so here I am.
Proposal
In axum\src\extract\path\de.rs have ValueDeserializer support serde deserialization with deserialize_seq.
The PathDeserializer would supply the wildcard path as string, which could then be split by / and pushed to the sequence.
Alternatives
Manually implement wildcard String value splitting by / chars for each wildcard route or write a custom path extractor and maybe submit that for axum-extra.
Feature Request
The path extractor currently only supports greedy extraction of the entire wildcard path value into a
Stringvalue. It should also supportVec<T>and handle the value extraction and parsing toT.Though I personally only need support for
Vec<String>:)Motivation
Currently wildcard values are generally deserialized into a
Stringand the user has to handle value extraction.For a project I would like to implement nested groups/namespaces, which requires using wildcards. This would require me to handle extracting the path values into a
Vec<String>before I can run logic for the strings.I don't see why axum's
Pathextractor shouldn't supportVec<String>, so here I am.Proposal
In
axum\src\extract\path\de.rshaveValueDeserializersupport serde deserialization withdeserialize_seq.The
PathDeserializerwould supply the wildcard path as string, which could then be split by/and pushed to the sequence.Alternatives
Manually implement wildcard
Stringvalue splitting by/chars for each wildcard route or write a custom path extractor and maybe submit that for axum-extra.