Open TheZwieback opened 2 weeks ago
Does it work if you set Cookie
as a header parameter and enter the value?
https://docs.stoplight.io/docs/elements/b074dc47b2826-elements-configuration-options Could you try using the tryItCredentialsPolicy
and set it to include
or same-origin
(depending on your use case) and see if that resolves your issue?
I have an API that returns an Set-Cookie header but the browser does not set the cookie properly using the elements openapi renderer for this endpoint. Other OpenAPI renderer work in this case. My guess is that the reason are omitted credentials see here: https://github.com/stoplightio/elements/blob/e0b10da220e9e9b49b2ec94fb1fa94d534a6a44f/packages/elements-core/src/components/TryIt/build-request.ts#L133
Context
Can't do basic testing via the UI as cookies are used in other API endpoints.
Current Behavior
Cookies not set in chrome or other browsers.
Expected Behavior
Cookie should be set.
Possible Workaround/Solution
None.
Steps to Reproduce
Don't have a live server sorry. Any API framework should be possible to write an endpoint in few lines. I have a Python litestar example if that helps, let me know.
Environment