-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
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
Wrap property example value in double quotes to avoid hex string being evaluated as a number? #875
Comments
One more vote for that. Quotes disappear if the example value string length is >= 36. The issue lies in the |
I reckon in what comes to
I don't know whether |
It is a public archive now https://github.com/dtolnay/serde-yaml |
I have a property definition like below with an example hexadecimal string, because the example field is not quoted the swagger UI interprets this as a decimal string instead of the raw hexadecimal string which I want.
Example output:
Wanted output:
The rust code which generates this is below, i've tried multiple combinations of wrapping the example string in single/double quotes (and inside a json! macro), but this adds multiple quotes (ie.
'"0x6810e776880c02933d47db1b9fc05908e5386b96"'
) and makes the value broken in swagger as a raw (unquoted string) is required.Can someone help me quote this string in the produced yaml?
Thanks,
Matt
The text was updated successfully, but these errors were encountered: