We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suppose I have a Config structure that have several nested options, some of them use #[serde(tag = "type")] or more serde attrs.
Config
#[serde(tag = "type")]
I'd like to get a table of all possible paths of Config, said:
server.http.listern_addr
storage.type
s3
azblob
storage.bucket
Is there some way to dump such a schema?
Alternatively, I can enumerate the paths by myself, but in this case, I'd like to write a test to ensure that all the paths are valid (can exist).
The text was updated successfully, but these errors were encountered:
https://github.com/zefchain/serde-reflection/tree/main/serde-reflection does this.
Sorry, something went wrong.
Good to know. Although, serde-reflection seems doesn't support #[serde(tag = "type")]:
serde-reflection
Attributes that are not compatible with binary formats (e.g. #[serde(flatten)], #[serde(tag = ..)])
I noticed serde-reflection refers to schemars, where I'm waiting for GREsau/schemars#364.
schemars
Anyway, this may not something can be done at serde itself. Just I'd like to know if anything else I'm missing.
serde
No branches or pull requests
Suppose I have a
Config
structure that have several nested options, some of them use#[serde(tag = "type")]
or more serde attrs.I'd like to get a table of all possible paths of
Config
, said:server.http.listern_addr
is a Stringstorage.type
can bes3
,azblob
, etc.storage.bucket
is a String.Is there some way to dump such a schema?
Alternatively, I can enumerate the paths by myself, but in this case, I'd like to write a test to ensure that all the paths are valid (can exist).
The text was updated successfully, but these errors were encountered: