-
Notifications
You must be signed in to change notification settings - Fork 90
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
Line feeds in example object value are ignored, text is truncated #1895
Comments
Just out of curiosity, if you add a space in the example before the |
Actually, space won't work - it's trimmed. Try adding a |
Well, using However, I have another endpoint which returns JSON, and the example value was not valid JSON. This was shown during build (cool!) and thus I could fix it. That example also contains line feeds, and it's rendered with line feeds in the What exactly do you mean with the |
I also wonder: Since this is |
Ok, so I set it to
And in Swagger UI:
|
Thanks, adding the + just breaks the conversion of the value to a number. This definitely seems like a bug. |
Yes, I also think so. Since no media type is given, the String should just be copied through to |
Thanks! |
I'm switching to Eclipse MicroProfile annotations from Swagger annotations and from another Maven plugin to the Smallrye Maven plugin.
I found that line feeds are ignored in @ExampleObject values. This is what I annotate:
With the old toolchain, I get the following in
openapi.json
:(I didn't specify any name back then.)
Rendered in SwaggerUI it looks like this:
With the Smallrye Maven plugin, this is what I get:
Of course, SwaggerUI shows it like this:
So any text after the first line feed is thrown away. As far as I remember, any OpenAPI text is considered Markdown, so shouldn't that work?
And is there any relation to the old rendering as one
example
and Smallrye correctly creatingexamples
?The text was updated successfully, but these errors were encountered: