Skip to content

Fetch example schema after putting #[schema(example = "...")] for all its elements #484

Answered by juhaku
TheAwiteb asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,
And thanks, 🙂

Simply put, there is no way to do that, unfortunately. Currently the only way to provide example is to call json! with new object or with json syntax itself the same way one would call serde_json::json!(...).

To implement this support will need some thinking but perhaps could be added in future.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by TheAwiteb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants