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
...
"/v1/search-stats": {"post": {"summary": "Various stats about keyword-search","description": "\tEstimates how many items (matched documents, non matched docs) a search string\n\twould return from the /search API.\n","operationId": "keywordSearchStats","requestBody": {"description": "The same as keywords in /search","content": {"application/json": {"schema": {"type": "string","example": "'seed germination' OR flower*"}}}},
...
Describe the bug you're encountering
When using the definitions above (coming from Swagger annotations), the Swagger UI includes double quotes in the displayed example, when you try the API with a literal value of: "'seed germination' OR flower*", the result is null, since the implementation expects to receive a string without double quotes: 'seed germination' OR flower*.
To reproduce...
Use @io.swagger.v3.oas.annotations.parameters.RequestBody in a Spring REST controller's method that accept a simple String as request body, then check the results in the Spring-generated Swagger UI.
Expected behavior
Double quotes should only be included when the example specify them, not automatically, as it seems to be the case.
Q&A (please complete the following information)
Content & configuration
Example Swagger/OpenAPI definition:
Describe the bug you're encountering
When using the definitions above (coming from Swagger annotations), the Swagger UI includes double quotes in the displayed example, when you try the API with a literal value of:
"'seed germination' OR flower*"
, the result is null, since the implementation expects to receive a string without double quotes:'seed germination' OR flower*
.To reproduce...
Use
@io.swagger.v3.oas.annotations.parameters.RequestBody
in a Spring REST controller's method that accept a simple String as request body, then check the results in the Spring-generated Swagger UI.Expected behavior
Double quotes should only be included when the example specify them, not automatically, as it seems to be the case.
Additional context or thoughts
Looks similar to #4643
The text was updated successfully, but these errors were encountered: