Contributions
- 1.6KViews0likes0Comments
Bug: "Delete operations cannot have a requestBody"
I'm using Swagger/OAS3 to document our existing API. When I document the DELETE method in one endpoint I get the following message: Delete operations cannot have a requestBody This endpoint uses the request body to pass a UserID, in the same way that our POST and PUT methods work. This has been discussed elsewhere as a bug:https://github.com/swagger-api/swagger-ui/issues/4425 When will this be fixed or can the error be disabled. Thank you.3.4KViews0likes1CommentOAS3, Lambda and method re-use
I've found an odd constraint in Swagger. We have a pre-existing API that uses Lambda to handle method requests. Many of our endpoints will call the same Lambda method with several Methods. So that PUT, POST and DELETE will all be served by the same Lambda method. In trying to define the API in Swagger/OAS, apparently I need to use the `operationID` operation to reference the name of the Lambda method. However, this `operationID` is required to be unique, whereas our Lambda methods are designed to be re-used wherever possible. How can I reference the same Lambda method from several API Methods,such as PUT, POST, etc? Put another way, If we are to use Swagger/OAS we must break up our Lambda methods into multiple methods? Or we can't use Swagger. This seems like a bizarre constraint. I really like Swagger, but this seems like a complete showstopper. Am I missing something?Does anyone else find this odd?Solved1.6KViews1like2CommentsTesting with JWT and SwaggerHub
Maybe I'm missing something here, but I would like to document our existing API using SwaggerHub (with the ultimate plans to define and replace our existing hand-built API). Our API uses OAuth2 with JWT authorization tokens, so that complicates the testing. I have built a first endpoint definition in SwaggerHub and now want to execute against it with a set of parameters so that I can record the response as part of the documentation. But since our API requires a Bearer Authorization header, I need a way insert that token. I don't think that Swagger is capable of retrieving the JWT token itself, so assume that I will need to grab a current JWT token and put it somewhere in Swaggerhub. Is there a place for me to put the token so that I can execute a request on our API?1.6KViews0likes1Comment- 4.7KViews0likes2Comments