You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where strings are always "string" and int is always 0
If we add examples we can give some more info.
Maybe with a syntax like:
#[schemars(example = "This is the example string")]
Used like this:
#[derive(Serialize,Deserialize,JsonSchema)]pubstructVersion{#[schemars(example = "1.0.0")]pubcode:String,#[schemars(example = "First release of our crate/application.")]pubdescription:String,}
This will result in something like:
{
"code": "1.0.0",
"description": "First release of our crate/application."
}
I don't know how this can also be done for int, but I think that is less of an issue.
For enums the first value is converted to string and that is used. So that does not have to change I think.
Adding support for examples.
Currently strings will have an example of:
Where strings are always
"string"
and int is always0
If we add examples we can give some more info.
Maybe with a syntax like:
#[schemars(example = "This is the example string")]
Used like this:
This will result in something like:
I don't know how this can also be done for int, but I think that is less of an issue.
For enums the first value is converted to string and that is used. So that does not have to change I think.
This issue is a repost of: GREsau/okapi#11
The text was updated successfully, but these errors were encountered: