-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
Including multiple body parameters on operation doesn't result in error #1235
Comments
@thecpdubguy I've made this issue specific to the multiple body parameters, as that's definitely an issue. For more context on the multiple types issue in OAIv2, see https://github.com/stoplightio/studio/issues/388 for more information. I may end up opening a separate issue for that with regards to Spectral, but let me sync with the team first. |
It seems like we report the error, yet the error message is a bit poor and doesn't really point at the actual problem in the document, therefore one can miss it - in fact, I couldn't locate it at first glance either. |
I don’t recall seeing this type of a warning. I’ll check when I’m back at work on Monday. I do know that multiple parameters are caught if there’s two parameter blocks, one at an operation level and one at a path level. For Example, the path parameter object has accountId path parameter and so does the GET operation. Maybe I’ve blended them together in my head. |
I tweaked the error reporting - the new errors will be more meaningful and detailed. |
Describe the bug
Developing API specifications in Stoplight Studio V1 does not identify OAS file issues. When my team imports this into our API management tool, the specification is checked with what I'm guessing is an implementation of swagger as it appears very closely similar to https://editor.swagger.io.
To Reproduce
I cannot copy content here as the APIs are company data which cannot be published. But one example is using an OpenAPI V2 specification - setting an attribute in a request JSON body to be data type "string" or "number" is not identified as an issue but it is identified as an issue with multiple types being invalid.
** EDIT **
Another issue that can come up is duplicate "in":"body" parameters for an API route. This is not identified as an issue but is indeed invalid.
Expected behavior
Invalid OAS 2 syntax is identified.
Screenshots
For security reasons I cannot attach screenshots.
Environment (remove any that are not applicable):
Additional context
I am not sure if there is a difference between OpenAPI and Swagger. My team faces issues Daily when importing de-referenced API specifications from Stoplight Studio to our API Management platform. My team indicated that this issue was not happening with Stoplight Next.
The text was updated successfully, but these errors were encountered: