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
select any API command (ex. Get /EafLmf/Opc/SerialNumber)
Try out and Execute
Data is returned OK, but Curl command is wrong.
Expected behavior
I would expect it to be correct.
Screenshots
Additional context or thoughts
I haven't changed any code or upgraded anything. I wasn't sure exactly what creates the Curl command and if some type of JSON change is changing the actual command. Its not a major issue, but just trying to understand whats going on.
The text was updated successfully, but these errors were encountered:
The default cURL command was changed to Bash style as a result of the "Request snippets" PR #6910. The requestSnippetsEnabled: true configuration option can be used to also display Windows-specific cURL command (with double quotes) and PowerShell cURL command in addition to the default Bash syntax. Here's a Swagger UI demo with this option: https://petstore.swagger.io/?requestSnippetsEnabled=true
Since you're using Swashbuckle, check with them if they expose the requestSnippetsEnabled option.
This is simply to keep the issue tracker clean - feel free to comment if there are any further thoughts or concerns, and we'll be happy to reopen this issue.
I'm sorry, I didn't follow up. This might be helpful for someone finding my question. This was the suggestion I received and it worked perfectly.
While the SwaggerUI middleware doesn't currently have a top-level config method for this, it does have a mechanism to add any config items you like. For example, I was able to enable the request snippets plugin as follows:
Q&A (please complete the following information)
Content & configuration
Configured directly with the Swashbuckle. AspNetCore Nuget
Describe the bug you're encountering
Currently, my curl looks like:
curl -X 'GET'
'http://localhost:46528/EafLmfOpc/SerialNumber'
-H 'accept: text/plain'
I can't say how long ago, but my curl was:
curl -X GET "http://localhost:46528/EafLmfOpc/SerialNumber" -H "accept: text/plain"
To reproduce...
Steps to reproduce the behavior:
Expected behavior
I would expect it to be correct.
Screenshots
Additional context or thoughts
I haven't changed any code or upgraded anything. I wasn't sure exactly what creates the Curl command and if some type of JSON change is changing the actual command. Its not a major issue, but just trying to understand whats going on.
The text was updated successfully, but these errors were encountered: