Skip to content
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

Proposal: Support for LINK and UNLINK HTTP methods #480

Closed
grunci opened this issue Oct 11, 2015 · 12 comments
Closed

Proposal: Support for LINK and UNLINK HTTP methods #480

grunci opened this issue Oct 11, 2015 · 12 comments
Labels
http Supporting HTTP features and interactions

Comments

@grunci
Copy link

grunci commented Oct 11, 2015

Hi,
I working on an app which has a REST interface where I use LINK and UNLINK HTTP methods to send messages. I would like to use swagger for documentation purposes, but unfortunately it does not support these two method types.
Have you considered the support of these?
RFC: http:https://tools.ietf.org/id/draft-snell-link-method-01.html

Regards,
Grunci

@dolmen
Copy link

dolmen commented Oct 12, 2015

Here is the real RFC (HTTP 1.1), not a draft:
https://tools.ietf.org/html/rfc2068#section-19.6.1

And the IANA registry of all HTTP methods:
https://www.iana.org/assignments/http-methods/http-methods.xhtml

@dolmen
Copy link

dolmen commented Oct 12, 2015

RFC2616 which obsoletes RFC2068 says about PATCH/LINK/UNLINK:

The PATCH, LINK, UNLINK methods were defined but not commonly implemented in previous versions of this specification.

But this RFC is dated of year 1999. Since, REST APIs and are born and PATCH/LINK/UNLINK become really useful. As Swagger already has support for PATCH, I don't see a reason to not support LINK/UNLINK too.

@dolmen
Copy link

dolmen commented Oct 12, 2015

nodejs' http-parser doesn't seem to support LINK/UNLINK... yet.

@dolmen
Copy link

dolmen commented Oct 12, 2015

The latest draft (as the name implies this is work in progress) about LINK/UNLINK: https://tools.ietf.org/html/draft-snell-link-method-12

@grunci
Copy link
Author

grunci commented Dec 9, 2015

Thx to @dolmen, nodejs http parser supports LINK & UNLINK
nodejs/http-parser@e557b62

When do you think the support of these HTTP methods can be available in swagger?

@fehguy
Copy link
Contributor

fehguy commented Dec 10, 2015

They won't be added to the current swagger-spec (that wouldn't make any sense) but they can be considered for the next one.

@grunci
Copy link
Author

grunci commented Dec 11, 2015

May I ask, how often do you create a new swagger spec?
I just would like to know some info regarding the 'when' question.

Thx

@fehguy
Copy link
Contributor

fehguy commented Dec 11, 2015

historically, roughly every year we have a new spec. Recall all tooling needs to be updated with each change to the spec.

@daedeloth
Copy link

I would like to vote htis one up, but I don't see any use in limiting this to link/unlink.
Why not allow any custom HTTP method (except for a select few reserved words)?

As long as the browser can send it, it should be documentable imho.

@ePaul
Copy link
Contributor

ePaul commented Apr 11, 2016

@dolmen @grunci: Do you have an example of an API where it is used? I've looked at RFC 2068, and the text there doesn't give me enough information on how the new links (or the removed links) are being transferred.

That might be one of the reasons for it not being implemented widely ;-)

@daedeloth
Copy link

At showpad we use these in combination with a Link: header.
We pretty much follow http:https://tools.ietf.org/id/draft-snell-link-method-01.html

@handrews
Copy link
Member

Closing as a duplicate/subset of #1747

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
http Supporting HTTP features and interactions
Projects
None yet
Development

No branches or pull requests

6 participants