-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Add cookie support #1010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cookie support #1010
Conversation
AJAX calls will sen document cookies. This is an interface for updating document cookies.
@mohsen1 I thought that cookie values would be passed in the parameters section. Is that not possible? |
That's the limit of XHR. You should set https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest |
My question isn't about the technical implementation, rather the UI. I would suggest that the UI not change, and swagger-js handles setting the document.cookies internally. You should simply render the UI fields for cookie support as normal input boxes. |
Two questions:
|
|
"in": "cookie" is indeed not in the spec. whether we support it or not is up to you. |
If |
It would be awesome to support Cookie. We are using cookie for our services and having support in the first place would be great. Please add cookie support. :( |
second cemo, we need cookie support badly since we use session in cookie |
hi Mohsen, |
Agree that if Whether that should be in the spec is a different question, and an issue should be opened on the swagger-spec project. While I appreciate that there may be many services today that use cookies, I see a number of disadvantages to using cookies with APIs. I'll try to avoid hijacking this thread more than I already have, but I'm interested in understanding the use cases for cookie-based APIs (will join spec issue discussion). |
@earth2marsh - for your viewing pleasure (well, and participation of course) :) |
AJAX calls will sen document cookies. This is an interface for updating
document cookies.