-
Notifications
You must be signed in to change notification settings - Fork 102
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
Initial OpenAPI specification of the tus protocol. #170
Conversation
Is 460 Checksums mismatch used somewhere else outside of tus? |
This part is missing: The Tus-Resumable header MUST be included in every request and response except for OPTIONS requests. The value MUST be the version of the protocol used by the Client or the Server. If the version specified by the Client is not supported by the Server, it MUST respond with the 412 Precondition Failed status and MUST include the Tus-Version header into the response. In addition, the Server MUST NOT process the request. |
Thank you for your incredible work here! Could you help me, as person who hasn't used OpenAPI before, with some basic questions:
|
|
Do you see anything I may have missed from the standard in the OpenAPI 2.0 file? |
Would it then make sense to only keep the OpenAPI 3 version in this repository and let the users convert it to OpenAPI 2 when necessary? I am not really a fan of having two OpenAPI files with basically the same content in this repository. Maintaining two files which are similar but also have differences is quite erroneous, especially since most contributors here are not OpenAPI experts (including me). That would also solve the problem with the duplicate header definitions. |
@RubenGarcia Your work here is truly amazing. Nice done! |
I just checked https://editor.swagger.io. You can convert from 2.0 to 3.0 but not from 3.0 to 2.0, I think because 3.0 added more functionality. |
From a quick Google search, I found https://lucybot-inc.github.io/api-spec-converter/ and https://github.com/LucyBot-Inc/api-spec-converter for converting from 3.0 to 2.0. Of course, I didn't try them yet. Do you have experience with them and can judge if they are helpful or not?
Yes, the protocol is stable but we have some new extensions lined up. So there are likely going to be some additions in the next weeks. |
I was not aware of these. Ok, then I'll make a 3.01 and add a note to use these as needed if you need 2.0. |
I moved the definitions of the headers which are used in various places to the end to avoid repetition. |
Thank you very much, Ruben! I will have a more in depth look at the content next week. Do you know if a good validator/linter exists, so we can ensure that we don't commit invalid OpenAPI specifications? |
I am using the swagger editor on swagger.io |
Ok, I was more thinking about a CLI tool or similar that we could automatically run for every commit to ensure that the OpenAPI file is not malformed. Do you know if that exists? |
Other tools:
Or this one Would you like me to setup super-linter in this repository? |
Hello @RubenGarcia, I want to apologize for my late reply! I do not know how but I lost this discussion totally from my radar! I am deeply sorry for that after all of the efforts you invested into this! super-linter in combination with Spectral looks like the tools we had in mind! Are you still interested in moving forward with this topic? |
Yes. I don't have experience with superlinter, but I think it's worth exploring. Do I need administrator priviledges or anything special? |
I added the configuration using |
Thank you very, very much! I will merge this, so we can see if the GH Action works. We can iterate over the specification in further PRs. |
Seems like there is still a configuration problem with bad GitHub credentials: https://github.com/tus/tus-resumable-upload-protocol/runs/1782659818?check_suite_focus=true#step:4:8 |
I just checked that link, and it shows green (success) for me, so I guess all is ok now. |
Following #169