Open Nalaxon opened 4 years ago
👍 Thanks for opening this issue! 🏷 I have applied any labels matching special text in your issue.
The team will review the labels and make any necessary changes.
Don't think it's a good idea to use 901 as the status code: https://stackoverflow.com/a/11871377/677735
@wing328 how about an option to be backwards compatible, since it works fine for http://editor.swagger.io/
Don't think it's a good idea to use 901 as the status code: https://stackoverflow.com/a/11871377/677735
Bumping this. I agree that when designing an API the 9xx status code should not be used, but the generator should nonetheless support it, because sometimes that is required to implement a client for a third party API that specifies a 9xx status code.
I agree with @sigbits-mvl , If the third-party API is not using a standard status code, the generator should not disallow to create and fail.
Also adding that I agree with the last two comments (@sigbits-mvl & @ayushwing). We're using 600 level codes and I just ran into this same error today.
Bug Report Checklist
Description
An error is raised if a response code like '9xx' is given.
Test with given exampel and command line. The given example works with https://editor.swagger.io/ Tested also with petstore.yaml, if an status '901' is added is fails with an similar error.
The German Wikipedia entry states that 9xx codes are common for proprietary use, unfortunately the English does not. https://www.webcron.org/en/http-codes, lists also 9xx status codes.
The validator reports an invalid response.
I didn't find anything that OpenApi does'nt intentionally support 9xx responses.
openapi-generator version
openapi-generator version: 4.3.1 openjdk build: 10.0.2+13 Windows 10
OpenAPI declaration file content or url
Output:
Command line used for generation
openapi-generator generate -i test.yaml -g typescript-jquery -o out\ts-test\
Steps to reproduce
Save the given yaml as test.yaml and genrate according to the given command line
Related issues/PRs
Suggest a fix
Do not raise an error on 9x response values