Contributions
Re: PATCH operation not working through Swagger UI
Hi there did you resolve this issue? I am new to swagger and breaking my head to solve this issue. I came across this same one and not sure if we can resolve this is not. Few things I observed, 1. Though the CORS is enabled by default, there should be someway to enable them in swagger as well if you want some kind of authorisation to work. (https://swagger.io/docs/open-source-tools/swagger-ui/usage/cors/) 2. There is some method to add `options` in the swagger code in a way you can do step 1. Please refer to the link for a rough idea, however, it is not working. I know I am missing something here but I tried everything I can to figure it out but failed. (https://www.reddit.com/r/aws/comments/89i459/api_gateway_cors_definition_with_swagger/) 3. I am not familiar with that yaml anchor part explained in the previous link. If you figured out what went wrong? Can you please share how you did that? If not, check the half way things i tried to solve, and check if you can guess something ;)2.3KViews0likes0CommentsApi authentication works when provided in query and not in header but actually it is set as a header
Hi all, I am new to swagger and in a learning phase. I have an API with API key in the header which works perfect with postman but when I am trying to document in swagger, it doesn't work. Actually, the API key is set as a header parameter. But in swagger, it works only when it is changed to the query parameter. This doesn't work when setting as a header param security: - ApiKeyAuth: [] // key globally declared components: // This doesn't work securitySchemes: ApiKeyAuth: type: apiKey in: header // api key is set as a header name: apikey This works when set as a query param security: - ApiKeyAuth: [] // key globally declared components: // This works securitySchemes: ApiKeyAuth: type: apiKey in: query // api key is set as a query name: apikey Can somebody help me? I am missing something clearly but don't know what. Thanks, Indhu647Views0likes0Comments