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
The API I'm documenting is session based
Sessions that can be anonymous or not
Those sessions rely on :
a session id in a cookie
a correlation id in another cookie
By defining 2 apiKey security schemes and listing them both for the target route
When I click execute, the generated curl request shows an invalid Cookie header
To reproduce...
Steps to reproduce the behavior:
Click on Authorize
set a value for the session id cookie (ex: foo)
set a value for the correlation id cookie (ex: bar)
close the authorization popup
tryout & execute the /sample request
The generated Cookie header is Cookie: ssid=foo&correlation_id=bar
Expected behavior
The & is an invalid cookie separator.
The cookie separator should be ; Cookie: ssid=foo; correlation_id=bar
Screenshots
Additional context or thoughts
Several thougths:
the session id and the correlation id are meant to be returned by a previous request... wondering if the securityShemes are the best way to handle such use case vs using operationId and links. But targeting two seperate response cookies is not obvious. the runtimeExpression spec doesn't support cookie sources and won't help to distinguish 2 Set-Cookie headers based on the cookie names
one of the reasons why there is a correlation id is because the session id is regularly updated (based on the session id renewal timeout recommended by OWasp). The authorize form will keep the initial session id value. It would be nice to be able to define that cookie as automatically renewable so it get changed when a response gives that cookie a new value. (but that should need an update to the open api spec)
The text was updated successfully, but these errors were encountered:
Q&A
Content & configuration
Swagger/OpenAPI definition:
Describe the bug you're encountering
The API I'm documenting is session based
Sessions that can be anonymous or not
Those sessions rely on :
By defining 2 apiKey security schemes and listing them both for the target route
When I click execute, the generated curl request shows an invalid Cookie header
To reproduce...
Steps to reproduce the behavior:
/sample
requestThe generated Cookie header is
Cookie: ssid=foo&correlation_id=bar
Expected behavior
The
&
is an invalid cookie separator.The cookie separator should be
;
Cookie: ssid=foo; correlation_id=bar
Screenshots
Additional context or thoughts
Several thougths:
operationId
andlinks
. But targeting two seperate response cookies is not obvious. the runtimeExpression spec doesn't supportcookie
sources and won't help to distinguish 2Set-Cookie
headers based on the cookie namesThe text was updated successfully, but these errors were encountered: